Increase HEALTHCHECK start time for services that need to wait for host resolving during startup.

In Docker Swarm mode the services listed below can get stuck in their start script, while they
are waiting for other services become available. Now, with HEALTHCHECK enabled, docker does not resolve
names of services that not pass HEALTHCHECK yet. Meaning that if one of the depenend services is not yet
available, it will create a chain of failing services.

The services below retry to resolve 100 time, with an average of 3.5 seconds. Hence, the --start-time
flag is now set at 350 seconds.
- dovecot (imap)
- postfix (smtp)
- rspamd (antispam)
master
Tim Möhlmann 6 years ago
parent c3e89967fb
commit a2fea36c79
No known key found for this signature in database
GPG Key ID: AFABC30066A39335

@ -14,4 +14,4 @@ VOLUME ["/data", "/mail"]
CMD /start.py
HEALTHCHECK CMD echo QUIT|nc localhost 110|grep "Dovecot ready."
HEALTHCHECK --start-period=350s CMD echo QUIT|nc localhost 110|grep "Dovecot ready."

@ -13,4 +13,4 @@ VOLUME ["/data"]
CMD /start.py
HEALTHCHECK CMD echo QUIT|nc localhost 25|grep "220 .* ESMTP Postfix"
HEALTHCHECK --start-period=350s CMD echo QUIT|nc localhost 25|grep "220 .* ESMTP Postfix"

@ -18,4 +18,4 @@ VOLUME ["/var/lib/rspamd"]
CMD /start.py
HEALTHCHECK CMD curl -f -L http://localhost:11334/ || exit 1
HEALTHCHECK --start-period=350s CMD curl -f -L http://localhost:11334/ || exit 1

Loading…
Cancel
Save