From c3e89967fb8ce7fc1fd431a2e618b82cc856cb4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20M=C3=B6hlmann?= Date: Sun, 21 Oct 2018 20:45:41 +0300 Subject: [PATCH] Fix front health checking - Specified seperated /health path in order to allow for healthcheck even if webmail and admin are not seletectd. This also allows healthchecking fom external services like DNS load balancers; - Make curl not to fail on TLS because localhost is not included in the certificates. --- core/nginx/Dockerfile | 2 +- core/nginx/conf/nginx.conf | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/core/nginx/Dockerfile b/core/nginx/Dockerfile index 87951c03..00ecf84e 100644 --- a/core/nginx/Dockerfile +++ b/core/nginx/Dockerfile @@ -13,4 +13,4 @@ VOLUME ["/certs"] CMD /start.py -HEALTHCHECK CMD curl -f -L http://localhost/ || exit 1 +HEALTHCHECK CMD curl -k -f -L http://localhost/health || exit 1 diff --git a/core/nginx/conf/nginx.conf b/core/nginx/conf/nginx.conf index 8fcda1c3..d2cbc7fe 100644 --- a/core/nginx/conf/nginx.conf +++ b/core/nginx/conf/nginx.conf @@ -146,6 +146,10 @@ http { proxy_pass_request_body off; proxy_set_header Content-Length ""; } + + location /health { + return 204; + } } # Forwarding authentication server