docker 容器健康检查调整

This commit is contained in:
wangliwen 2022-11-01 13:49:35 +08:00
parent e4521cbc97
commit 7871851313
1 changed files with 2 additions and 2 deletions

View File

@ -11,8 +11,8 @@ VOLUME ["/usr/hisense"]
ADD application/$TAR_FILE $VERTICLE_HOME/
COPY simsun.ttc /usr/share/fonts/truetype/dejavu/
RUN cd /usr/share/fonts/truetype/dejavu && chmod 755 * && fc-cache -fv
HEALTHCHECK --interval=3m --timeout=3s --start-period=3m --retries=5 CMD curl --silent --fail 127.0.0.1:8888/renren-admin/census/center/v2/whole_amount || exit 1
HEALTHCHECK --interval=3m --timeout=3s --start-period=3m --retries=5 CMD curl --silent --fail 127.0.0.1:8888/ucs-admin/census/center/v2/whole_amount || exit 1
WORKDIR $VERTICLE_HOME/renren-admin
ENTRYPOINT ["sh", "-c"]
CMD ["exec java -jar -Dfile.encoding=utf-8 -server -Xshareclasses -Xtune:virtualized -Xms512M -Xmx$Xmx -XX:ReservedCodeCacheSize=64m -XX:InitialCodeCacheSize=64m -XX:+UnlockExperimentalVMOptions -XX:+UseZGC -XX:ConcGCThreads=1 -XX:ParallelGCThreads=2 -XX:ZCollectionInterval=120 -XX:ZAllocationSpikeTolerance=5 -Duser.timezone=GMT+08 $JAR_FILE --spring.profiles.active=$ACTIVE"]
CMD ["exec java -jar -Dfile.encoding=utf-8 -server -Xshareclasses -Xtune:virtualized -Xms512M -Xmx$Xmx -XX:ReservedCodeCacheSize=240m -XX:InitialCodeCacheSize=240m -XX:+UnlockExperimentalVMOptions -XX:+UseZGC -XX:ConcGCThreads=1 -XX:ParallelGCThreads=2 -XX:ZCollectionInterval=120 -XX:ZAllocationSpikeTolerance=5 -Duser.timezone=GMT+08 $JAR_FILE --spring.profiles.active=$ACTIVE"]