From a790ac73fd42d266a957e09a05b1894199605f6a Mon Sep 17 00:00:00 2001 From: "Marvin A. Ruder" Date: Fri, 18 Apr 2025 18:43:11 +0200 Subject: [PATCH] fix: health check for containers with reverse proxy disabled (#816) * Fixes #809 Signed-off-by: Marvin A. Ruder --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 9b59438..e11b216 100644 --- a/Dockerfile +++ b/Dockerfile @@ -59,7 +59,7 @@ COPY ./scripts/docker ./scripts/docker EXPOSE 3000 -HEALTHCHECK --interval=10s --timeout=3s CMD curl -f http://localhost:3000/api/health || exit 1 +HEALTHCHECK --interval=10s --timeout=3s CMD /bin/sh -c '(if [[ "$CADDY_DISABLED" = "true" ]]; then curl -fs http://localhost:${BACKEND_PORT:-8080}/api/health; else curl -fs http://localhost:3000/api/health; fi) || exit 1' ENTRYPOINT ["sh", "./scripts/docker/create-user.sh"] CMD ["sh", "./scripts/docker/entrypoint.sh"] \ No newline at end of file