From 02bb3a44a7584f9e04facd254429f7379ee644a5 Mon Sep 17 00:00:00 2001 From: andryyy Date: Tue, 29 Oct 2019 19:58:34 +0100 Subject: [PATCH] [Rspamd] Wait for PHP to not break inotify --- data/Dockerfiles/rspamd/Dockerfile | 1 + data/Dockerfiles/rspamd/docker-entrypoint.sh | 13 +++++++++++++ docker-compose.yml | 2 +- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/data/Dockerfiles/rspamd/Dockerfile b/data/Dockerfiles/rspamd/Dockerfile index 58cd1ac5..af614389 100644 --- a/data/Dockerfiles/rspamd/Dockerfile +++ b/data/Dockerfiles/rspamd/Dockerfile @@ -11,6 +11,7 @@ RUN apt-get update && apt-get install -y \ gnupg2 \ apt-transport-https \ dnsutils \ + netcat \ && apt-key adv --fetch-keys https://rspamd.com/apt-stable/gpg.key \ && echo "deb [arch=amd64] https://rspamd.com/apt-stable/ $CODENAME main" > /etc/apt/sources.list.d/rspamd.list \ && echo "deb-src [arch=amd64] https://rspamd.com/apt-stable/ $CODENAME main" >> /etc/apt/sources.list.d/rspamd.list \ diff --git a/data/Dockerfiles/rspamd/docker-entrypoint.sh b/data/Dockerfiles/rspamd/docker-entrypoint.sh index 5c9f8e49..fc0bfb72 100755 --- a/data/Dockerfiles/rspamd/docker-entrypoint.sh +++ b/data/Dockerfiles/rspamd/docker-entrypoint.sh @@ -1,5 +1,18 @@ #!/bin/bash +echo "Waiting for PHP to settle..." +sleep 10 + +until nc phpfpm 9001 -z; do + echo "Waiting for PHP on port 9001..." + sleep 3 +done + +until nc phpfpm 9002 -z; do + echo "Waiting for PHP on port 9002..." + sleep 3 +done + mkdir -p /etc/rspamd/plugins.d \ /etc/rspamd/custom diff --git a/docker-compose.yml b/docker-compose.yml index 9f0ca604..3aeda03b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -68,7 +68,7 @@ services: - clamd rspamd-mailcow: - image: mailcow/rspamd:1.50 + image: mailcow/rspamd:1.51 build: ./data/Dockerfiles/rspamd stop_grace_period: 30s depends_on: