1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-17 17:47:03 +00:00

docker: Add a healthcheck (#152)

Use the INBUCKET_WEB_ADDR value to get the port number of Inbucket using 'cut'. If the variable is not set, use the default value (and that is 0.0.0.0:9000). Healtcheck will check the exit code of the command executed (0=HEALTHY)
This commit is contained in:
Martijn Suijlen
2020-03-30 05:40:39 +02:00
committed by GitHub
parent 2c74268014
commit c91a3ecd41

View File

@@ -44,6 +44,9 @@ ENV INBUCKET_STORAGE_PARAMS path:/storage
ENV INBUCKET_STORAGE_RETENTIONPERIOD 72h
ENV INBUCKET_STORAGE_MAILBOXMSGCAP 300
# Healthcheck
HEALTHCHECK --interval=5s --timeout=5s --retries=3 CMD /bin/sh -c 'wget localhost:$(echo ${INBUCKET_WEB_ADDR:-0.0.0.0:9000}|cut -d: -f2) -q -O - > /dev/null 2>&1'
# Ports: SMTP, HTTP, POP3
EXPOSE 2500 9000 1100