diff --git a/api/api-passenger/pom.xml b/api/api-passenger/pom.xml index ab8205d..e0db710 100644 --- a/api/api-passenger/pom.xml +++ b/api/api-passenger/pom.xml @@ -69,6 +69,7 @@ + ${project.artifactId} org.springframework.boot diff --git a/docker/api/api-passenger/Dockerfile b/docker/api/api-passenger/Dockerfile new file mode 100644 index 0000000..89bcf8e --- /dev/null +++ b/docker/api/api-passenger/Dockerfile @@ -0,0 +1,25 @@ +# 最低使用jdk11打包这个项目 +FROM openjdk:11-jre + +# 作者为 XiaoHH +MAINTAINER XiaoHH + +# 添加可执行文件到 +ADD api-passenger.jar add.jar + +# 暴露指定端口 +EXPOSE 10000 + +# JVM 调优参数 +ENV JAVA_OPTION="-Dfile.encoding=UTF-8 -XX:+UseParallelGC -XX:+PrintGCDetails -Xloggc:/var/log/api-passenger.gc.log -XX:+HeapDumpOnOutOfMemoryError -XX:+DisableExplicitGC" + +# 设置内存大小 +ENV XMX=256M +ENV XMS=256M +ENV XMN=128M + +# 运行环境参数 +ENV SPRING_PROFILES_ACTIVE=dev + +# 运行程序 +ENTRYPOINT ["sh", "-c", "java -Djava.security.egd=file:/dev/./urandom -jar -Xmx${XMX} -Xms${MXS} -Xmn${XMN} $JAVA_OPTION -Dspring.profiles.active=${SPRING_PROFILES_ACTIVE} /app.jar"] diff --git a/docker/service/service-verification-code/Dockerfile b/docker/service/service-verification-code/Dockerfile new file mode 100644 index 0000000..375a597 --- /dev/null +++ b/docker/service/service-verification-code/Dockerfile @@ -0,0 +1,25 @@ +# 最低使用jdk11打包这个项目 +FROM openjdk:11-jre + +# 作者为 XiaoHH +MAINTAINER XiaoHH + +# 添加可执行文件到 +ADD service-verification-code.jar add.jar + +# 暴露指定端口 +EXPOSE 10010 + +# JVM 调优参数 +ENV JAVA_OPTION="-Dfile.encoding=UTF-8 -XX:+UseParallelGC -XX:+PrintGCDetails -Xloggc:/var/log/service-verification-code.gc.log -XX:+HeapDumpOnOutOfMemoryError -XX:+DisableExplicitGC" + +# 设置内存大小 +ENV XMX=256M +ENV XMS=256M +ENV XMN=128M + +# 运行环境参数 +ENV SPRING_PROFILES_ACTIVE=dev + +# 运行程序 +ENTRYPOINT ["sh", "-c", "java -Djava.security.egd=file:/dev/./urandom -jar -Xmx${XMX} -Xms${MXS} -Xmn${XMN} $JAVA_OPTION -Dspring.profiles.active=${SPRING_PROFILES_ACTIVE} /app.jar"] diff --git a/service/service-verification-code/pom.xml b/service/service-verification-code/pom.xml index fd5b340..eaa3d8d 100644 --- a/service/service-verification-code/pom.xml +++ b/service/service-verification-code/pom.xml @@ -69,6 +69,7 @@ + ${project.artifactId} org.springframework.boot