You've already forked Mailu
mirror of
https://github.com/Mailu/Mailu.git
synced 2025-12-17 23:37:34 +02:00
Add health-check
This commit is contained in:
@@ -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:10204/health
|
||||
HEALTHCHECK --start-period=60s CMD curl -skfLo /dev/null http://127.0.0.1:10204/health && echo PING|nc -w2 localhost 5001|grep "PONG"
|
||||
|
||||
VOLUME ["/certs", "/overrides"]
|
||||
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
# General
|
||||
###############
|
||||
log_path = /dev/stderr
|
||||
info_log_path = /dev/stdout
|
||||
debug_log_path = /dev/stdout
|
||||
protocols = sieve
|
||||
postmaster_address = {{ POSTMASTER }}@{{ DOMAIN }}
|
||||
hostname = {{ HOSTNAMES.split(",")[0] }}
|
||||
@@ -21,11 +23,11 @@ haproxy_trusted_networks = {% if REAL_IP_FROM %}{% for from_ip in REAL_IP_FROM.s
|
||||
auth_username_chars =
|
||||
auth_mechanisms = plain login
|
||||
|
||||
{% if TLS %}
|
||||
{%- if TLS %}
|
||||
ssl = required
|
||||
ssl_cert = <{{ TLS[0] }}
|
||||
ssl_key = <{{ TLS[1] }}
|
||||
{% if TLS_FLAVOR in ['letsencrypt','mail-letsencrypt'] %}
|
||||
{%- if TLS_FLAVOR in ['letsencrypt','mail-letsencrypt'] %}
|
||||
ssl_alt_cert = <{{ TLS[2] }}
|
||||
ssl_alt_key = <{{ TLS[3] }}
|
||||
{% endif %}
|
||||
@@ -47,16 +49,23 @@ passdb {
|
||||
}
|
||||
|
||||
service auth-worker {
|
||||
user = $default_internal_user
|
||||
group = $default_internal_group
|
||||
user = dovenull
|
||||
group = dovenull
|
||||
}
|
||||
|
||||
service managesieve-login {
|
||||
executable = managesieve-login
|
||||
inet_listener sieve {
|
||||
port = 4190
|
||||
{% if PROXY_PROTOCOL in ['all', 'mail'] %}
|
||||
{%- if PROXY_PROTOCOL in ['all', 'mail'] %}
|
||||
haproxy = yes
|
||||
{% endif %}
|
||||
}
|
||||
}
|
||||
|
||||
service health-check {
|
||||
executable = script -p health-check.sh
|
||||
inet_listener health-check {
|
||||
port = 5001
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,10 @@ 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)$')
|
||||
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+$',
|
||||
])
|
||||
|
||||
# Check if a stale pid file exists
|
||||
if os.path.exists("/var/run/nginx.pid"):
|
||||
|
||||
Reference in New Issue
Block a user