From 394cb1c78d79b2270ea816b6fab94f877aae26ae Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Wed, 10 Mar 2021 14:35:12 +0000 Subject: [PATCH] Add health check routes for portal and prosody --- nginx/snikket-common.template | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/nginx/snikket-common.template b/nginx/snikket-common.template index 56ed5d0..bf07f53 100644 --- a/nginx/snikket-common.template +++ b/nginx/snikket-common.template @@ -74,6 +74,20 @@ location @prosodyws { proxy_read_timeout 900s; } +location /_health/portal { + proxy_pass http://${SNIKKET_TWEAK_PORTAL_INTERNAL_HTTP_HOST}:${SNIKKET_TWEAK_PORTAL_INTERNAL_HTTP_PORT}/_health; + proxy_set_header Host $host; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto https; +} + +location /_health/xmpp { + proxy_pass http://${SNIKKET_TWEAK_INTERNAL_HTTP_HOST}:${SNIKKET_TWEAK_INTERNAL_HTTP_PORT}/host_status_check; + proxy_set_header Host $host; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto https; +} + error_page 502 /_errors/502.html; error_page 503 /_errors/503.html; error_page 504 /_errors/504.html;