Fix Rspamd

master
andryyy 2017-03-04 00:02:42 +01:00
parent 24f3bf009c
commit 714490ad5e
2 changed files with 9 additions and 5 deletions

View File

@ -18,13 +18,11 @@ RUN echo '.include $LOCAL_CONFDIR/local.d/rspamd.conf.local' > /etc/rspamd/rspam
ADD settings.conf /etc/rspamd/modules.d/settings.conf
ADD antivirus.conf /etc/rspamd/modules.d/antivirus.conf
ADD wait-for-it.sh /wait-for-it.sh
RUN pip install -U oletools
RUN timeout 30 /usr/bin/rspamd -f -u _rspamd -g _rspamd; exit 0
RUN chmod +x /wait-for-it.sh
CMD ["/wait-for-it.sh", "nginx:8081", "--", "/usr/bin/rspamd", "-f", "-u", "_rspamd", "-g", "_rspamd"]
CMD ["/usr/bin/rspamd", "-f", "-u", "_rspamd", "-g", "_rspamd"]
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

View File

@ -59,8 +59,8 @@ services:
image: andryyy/mailcow-dockerized:rspamd
build: ./data/Dockerfiles/rspamd
depends_on:
- nginx-mailcow
- php-fpm-mailcow
nginx-mailcow:
condition: service_healthy
volumes:
- ./data/conf/rspamd/override.d/:/etc/rspamd/override.d:ro
- ./data/conf/rspamd/local.d/:/etc/rspamd/local.d:ro
@ -213,7 +213,13 @@ services:
nginx-mailcow:
depends_on:
- sogo-mailcow
- php-fpm-mailcow
image: nginx:mainline
healthcheck:
test: ["CMD", "ping", "php-fpm-mailcow", "-c", "10"]
interval: 10s
timeout: 30s
retries: 5
command: /bin/bash -c "envsubst < /etc/nginx/conf.d/templates/listen_plain.template > /etc/nginx/conf.d/listen_plain.active &&
envsubst < /etc/nginx/conf.d/templates/listen_ssl.template > /etc/nginx/conf.d/listen_ssl.active &&
envsubst < /etc/nginx/conf.d/templates/server_name.template > /etc/nginx/conf.d/server_name.active &&