提交 514cbaed 作者: yanxin

容器构建配置修改

上级 5abdaa6f
......@@ -21,19 +21,21 @@ ARG PORT
ARG NACOS_SERVER
ARG NACOS_USERNAME
ARG NACOS_PASSWORD
ARG NACOS_LOCAL_IP
ENV APP_OPTS1="-Dspring.profiles.active=${ENV_NAME}"
ENV APP_OPTS2="-Djasypt.encryptor.password=1@wdLkj90#chMsdzxA%2024"
ENV APP_OPTS3="-Dfile.encoding=utf-8"
ENV APP_OPTS4="-Duser.timezone=Asia/Shanghai"
ENV APP_OPTS5="-Dspring.cloud.nacos.discovery.server-addr=${NACOS_SERVER}"
ENV APP_OPTS6="-Dspring.cloud.nacos.config.server-addr=${NACOS_SERVER}"
ENV APP_OPTS7="-Dspring.cloud.nacos.config.username=${NACOS_USERNAME}"
ENV APP_OPTS8="-Dspring.cloud.nacos.config.password=${NACOS_PASSWORD}"
ENV APP_OPTS9="-Dserver.port=${PORT}"
ENV APP_OPTS6="-Dspring.cloud.nacos.discovery.ip=${NACOS_LOCAL_IP}"
ENV APP_OPTS7="-Dspring.cloud.nacos.config.server-addr=${NACOS_SERVER}"
ENV APP_OPTS8="-Dspring.cloud.nacos.config.username=${NACOS_USERNAME}"
ENV APP_OPTS9="-Dspring.cloud.nacos.config.password=${NACOS_PASSWORD}"
ENV APP_OPTS10="-Dserver.port=${PORT}"
ENV JVM_OPTS="-Xmx2024M -Xms256M"
EXPOSE ${PORT}
ENTRYPOINT ["sh","-c","java $JVM_OPTS $APP_OPTS1 $APP_OPTS2 $APP_OPTS3 $APP_OPTS4 $APP_OPTS5 $APP_OPTS6 $APP_OPTS7 $APP_OPTS8 -jar /workspace/app.jar"]
\ No newline at end of file
ENTRYPOINT ["sh","-c","java $JVM_OPTS $APP_OPTS1 $APP_OPTS2 $APP_OPTS3 $APP_OPTS4 $APP_OPTS5 $APP_OPTS6 $APP_OPTS7 $APP_OPTS8 $APP_OPTS9 $APP_OPTS10 -jar /workspace/app.jar"]
\ No newline at end of file
......@@ -50,6 +50,7 @@ function handle {
--build-arg NACOS_SERVER=${nacos_server} \
--build-arg NACOS_USERNAME=${nacos_username} \
--build-arg NACOS_PASSWORD=${nacos_password} \
--build-arg NACOS_LOCAL_IP=${nacos_local_ip} \
-f ./build/Dockerfile -t ${domain}/${namespace}/${name}:${version} .
echo "---推送镜像---"
......
......@@ -26,5 +26,6 @@ svc_port="1689"
# nacos配置
nacos_server="192.168.0.225:8848"
nacos_local_ip="192.168.0.188"
nacos_username="nacos"
nacos_password="nacos"
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论