From 93df52f70c3a24013a77a8331ac6ce2aad8f3046 Mon Sep 17 00:00:00 2001 From: Adam Outler Date: Mon, 2 Mar 2026 19:39:23 +0000 Subject: [PATCH] Fix healthcheck for non-0.0.0.0. will pass as long as reachable. --- install/production-filesystem/services/healthcheck.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/install/production-filesystem/services/healthcheck.sh b/install/production-filesystem/services/healthcheck.sh index 166cbe4f..f45dc1ab 100755 --- a/install/production-filesystem/services/healthcheck.sh +++ b/install/production-filesystem/services/healthcheck.sh @@ -49,10 +49,11 @@ else fi # 5. Check port 20211 is open and contains "netalertx" -if curl -sf --max-time 10 "http://localhost:${PORT:-20211}" | grep -i "netalertx" > /dev/null; then - log_success "Port ${PORT:-20211} is responding and contains 'netalertx'" +[ "${LISTEN_ADDR}" == "0.0.0.0" ] && CHECK_ADDR="127.0.0.1" || CHECK_ADDR="${LISTEN_ADDR}"; +if timeout 10 bash -c "/dev/null; then + log_success "Port ${PORT:-20211} is responding" else - log_error "Port ${PORT:-20211} is not responding or doesn't contain 'netalertx'" + log_error "Port ${PORT:-20211} is not responding" fi # NOTE: GRAPHQL_PORT might not be set and is initailized as a setting with a default value in the container. It can also be initialized via APP_CONF_OVERRIDE @@ -71,4 +72,4 @@ else echo "[HEALTHCHECK] ❌ One or more health checks failed" fi -exit $EXIT_CODE \ No newline at end of file +exit $EXIT_CODE