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)
22 lines
510 B
Docker
22 lines
510 B
Docker
FROM alpine:3.8
|
|
|
|
RUN apk add --no-cache python py-jinja2 rspamd rspamd-controller rspamd-proxy ca-certificates py-pip curl \
|
|
&& pip install --upgrade pip \
|
|
&& pip install tenacity
|
|
|
|
RUN mkdir /run/rspamd
|
|
|
|
COPY conf/ /conf
|
|
COPY start.py /start.py
|
|
|
|
# Temporary fix to remove references to rspamd-fuzzy for now
|
|
RUN sed -i '/fuzzy/,$d' /etc/rspamd/rspamd.conf
|
|
|
|
EXPOSE 11332/tcp 11334/tcp
|
|
|
|
VOLUME ["/var/lib/rspamd"]
|
|
|
|
CMD /start.py
|
|
|
|
HEALTHCHECK --start-period=350s CMD curl -f -L http://localhost:11334/ || exit 1
|