Skip to content

Commit

Permalink
add more healthchecks
Browse files Browse the repository at this point in the history
  • Loading branch information
firefart committed Nov 16, 2023
1 parent 4965e7c commit a00ebfa
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update \
&& apt-get -q -y install --no-install-recommends \
procps supervisor ca-certificates getmail6 wget curl gnupg graphviz libssl3 \
zlib1g libgd3 libexpat1 libpq5 w3m elinks links html2text lynx openssl cron bash \
libfcgi-bin \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# msmtp - disabled for now to use the newer version
Expand Down Expand Up @@ -167,3 +168,5 @@ USER rt
WORKDIR /opt/rt5/

CMD [ "/usr/bin/supervisord" ]

HEALTHCHECK --interval=10s --timeout=3s --start-period=10s --retries=3 CMD cgi-fcgi -connect localhost:9000 -bind || exit 1
3 changes: 3 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ services:
command: ["/root/cron_entrypoint.sh"]
# no need for tini here
entrypoint: ""
# disable the healthcheck from the main dockerfile
healthcheck:
disable: true
depends_on:
- rt
# we send rt-mailgate over to nginx
Expand Down
2 changes: 1 addition & 1 deletion nginx/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ COPY healthcheck.conf /etc/nginx/conf.d/healthcheck.conf
COPY full.conf /etc/nginx/full.conf
RUN rm -f /usr/share/nginx/html/index.html

HEALTHCHECK --interval=10s --timeout=3s CMD curl -f http://localhost:9001/health || exit 1
HEALTHCHECK --interval=10s --timeout=3s --start-period=5s --retries=3 CMD curl -f http://localhost:9001/health || exit 1

0 comments on commit a00ebfa

Please sign in to comment.