支持docker

pull/3/head
tanghc 4 years ago
parent 92d2ba6a20
commit 62bbb9a130
  1. 12
      docker-entrypoint.sh
  2. 15
      dockerfile

@ -0,0 +1,12 @@
#!/bin/bash
JAVA_OPTS="-Xms128m -Xmx128m"
CONF="--mysql.host=10.1.30.120:3306 --register.url=10.1.30.110:8848"
nohup java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar /sop/sop-gateway/sop-gateway.jar $CONF --logging.file.path=/sop/sop-gateway/log > /dev/null 2>&1 &
nohup java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar /sop/sop-admin/sop-admin.jar $CONF --logging.file.path=/sop/sop-admin/log > /dev/null 2>&1 &
nohup java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar /sop/sop-website/sop-website.jar $CONF --logging.file.path=/sop/sop-website/log > /dev/null 2>&1 &
nohup java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar /sop/sop-auth/sop-auth.jar $CONF --logging.file.path=/sop/sop-auth/log > /dev/null 2>&1 &
nohup java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar /sop/sop-story/sop-story.jar $CONF --logging.file.path=/sop/sop-story/log > /dev/null 2>&1 &

@ -8,17 +8,4 @@ ADD sop-website/target/*.jar sop/sop-website/sop-website.jar
ADD sop-auth/target/*.jar sop/sop-website/sop-auth.jar
ADD sop-example/sop-story/target/*.jar sop/sop-story/sop-story.jar
# JVM设置
ENV JAVA_OPTS="-Xms128m -Xmx128m"
# springboot配置文件
# --logging.file:日志
# --mysql.host:mysql地址
# --register.url:nacos地址
ENV CONF="--mysql.host=10.1.30.120:3306 --register.url=10.1.30.110:8848"
ENTRYPOINT java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /sop/sop-gateway/sop-gateway.jar ${CONF} --logging.file.path=/sop/sop-gateway/log \
&& java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /sop/sop-admin/sop-admin.jar ${CONF} --logging.file.path=/sop/sop-admin/log \
&& java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /sop/sop-website/sop-website.jar ${CONF} --logging.file.path=/sop/sop-website/log \
&& java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /sop/sop-auth/sop-auth.jar ${CONF} --logging.file.path=/sop/sop-auth/log \
&& java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /sop/sop-story/sop-story.jar ${CONF} --logging.file.path=/sop/sop-story/log
ENTRYPOINT ["docker-entrypoint.sh"]

Loading…
Cancel
Save