Skip to content

Commit

Permalink
Perform HEALTHCHECK more frequently to enable earlier recognition of …
Browse files Browse the repository at this point in the history
…healthy status.
  • Loading branch information
trampgeek committed Aug 18, 2024
1 parent 4d35c49 commit a1c1bda
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,11 @@ RUN ln -snf /usr/share/zoneinfo/"$TZ" /etc/localtime && \
# Expose apache
EXPOSE 80

# Healthcheck, minimaltest.py should complete within 2 seconds
HEALTHCHECK --interval=5m --timeout=2s \
# Healthcheck every minute, minimaltest.py should complete within 2 seconds
# If you're running docker version 25.0 or later, you could consider
# changing the following line to
# HEALTHCHECK --start-period=30s --start-interval=5s --interval=5m --timeout=2s \
HEALTHCHECK --interval=1m --timeout=2s \
CMD /usr/bin/python3 /var/www/html/jobe/minimaltest.py || exit 1

# Start apache
Expand Down

0 comments on commit a1c1bda

Please sign in to comment.