diff --git a/core/nginx/Dockerfile b/core/nginx/Dockerfile index 4152d1c3..cfe84018 100644 --- a/core/nginx/Dockerfile +++ b/core/nginx/Dockerfile @@ -28,7 +28,7 @@ RUN echo $VERSION >/version EXPOSE 80/tcp 443/tcp 110/tcp 143/tcp 465/tcp 587/tcp 993/tcp 995/tcp 25/tcp 4190/tcp # EXPOSE 10025/tcp 10143/tcp -HEALTHCHECK --start-period=60s CMD curl -skfLo /dev/null http://127.0.0.1/health && echo PING|nc -w2 127.0.0.1 5001|grep -q "PONG" +HEALTHCHECK --start-period=60s CMD curl -skfLo /dev/null http://127.0.0.1/health && kill -0 `cat /run/dovecot/master.pid` VOLUME ["/certs", "/overrides"] diff --git a/core/nginx/proxy.conf b/core/nginx/proxy.conf index 29c4bd32..668667d0 100644 --- a/core/nginx/proxy.conf +++ b/core/nginx/proxy.conf @@ -61,10 +61,3 @@ service managesieve-login { {% endif %} } } - -service health-check { - executable = script -p health-check.sh - inet_listener health-check { - port = 5001 - } -} diff --git a/core/nginx/start.py b/core/nginx/start.py index d24c19b8..01ecca03 100755 --- a/core/nginx/start.py +++ b/core/nginx/start.py @@ -4,10 +4,7 @@ import os import subprocess from socrate import system -system.set_env(log_filters=[ - r'could not be resolved \(\d\: [^\)]+\) while in resolving client address, client\: [^,]+, server: [^\:]+\:(25,110,143,587,465,993,995)$', - r'waitpid\(\) returned unknown PID \d+$', -]) +system.set_env(log_filters=r'could not be resolved \(\d\: [^\)]+\) while in resolving client address, client\: [^,]+, server: [^\:]+\:(25,110,143,587,465,993,995)$') # Check if a stale pid file exists if os.path.exists("/var/run/nginx.pid"):