1
0
mirror of https://github.com/Mailu/Mailu.git synced 2024-12-12 10:45:38 +02:00

Simplify the health-check

This commit is contained in:
Florent Daigniere 2023-04-21 17:36:24 +02:00
parent e6b9285f86
commit 5d93ae205e
3 changed files with 2 additions and 12 deletions

View File

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

View File

@ -61,10 +61,3 @@ service managesieve-login {
{% endif %}
}
}
service health-check {
executable = script -p health-check.sh
inet_listener health-check {
port = 5001
}
}

View File

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