nginx behind proxy: provide a healthcheck for localhost over port 10204

This commit is contained in:
Didier 'OdyX' Raboud
2023-03-28 13:19:09 +02:00
parent 2e40467376
commit cd7dc7baea
2 changed files with 9 additions and 1 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
# EXPOSE 10025/tcp 10143/tcp 14190/tcp
HEALTHCHECK --start-period=60s CMD curl -skfLo /dev/null http://localhost/health
HEALTHCHECK --start-period=60s CMD curl -skfLo /dev/null http://127.0.0.1:10204/health
VOLUME ["/certs", "/overrides"]

View File

@@ -291,6 +291,14 @@ http {
}
}
# Healthcheck over localhost, for docker
server {
listen 127.0.0.1:10204;
location /health {
return 204;
}
}
include /etc/nginx/conf.d/*.conf;
}