Add user/pass (if defined) to healthcheck

This commit is contained in:
myhomeiot
2025-02-20 21:52:21 +02:00
parent 762aaaa773
commit 7272e5458b

View File

@@ -145,4 +145,4 @@ HEALTHCHECK \
--retries=5 \
--start-period=30s \
--timeout=25s \
CMD curl -A "HealthCheck: Docker/1.0" -s -f "http://127.0.0.1:${HEALTH_PORT}${HEALTH_URL}" &>/dev/null || exit 1
CMD curl -A "HealthCheck: Docker/1.0" -s -f $([ -n "${user}" ] && [ -n "${pass}" ] && echo "-u ${user}:${pass}") "http://127.0.0.1:${HEALTH_PORT}${HEALTH_URL}" &>/dev/null || exit 1