1
0
mirror of https://github.com/Mailu/Mailu.git synced 2025-02-19 19:10:25 +02:00

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)
This commit is contained in:
Tim Möhlmann 2018-10-21 20:49:01 +03:00
parent c3e89967fb
commit a2fea36c79
No known key found for this signature in database
GPG Key ID: AFABC30066A39335
3 changed files with 3 additions and 3 deletions

View File

@ -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."

View File

@ -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"

View File

@ -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