From 175d1cc8f27e3bbb21cc8f91fce35c6f35dd9f18 Mon Sep 17 00:00:00 2001 From: ScribblerCoder <35840617+ScribblerCoder@users.noreply.github.com> Date: Fri, 19 Jul 2024 03:06:15 +0300 Subject: [PATCH] patch Healtcheck - Add optional PORT - added `-n` to jq to return expected exit code when input is empty/null --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index a217595ea..8078bf0ea 100644 --- a/Dockerfile +++ b/Dockerfile @@ -151,7 +151,7 @@ COPY --chown=$UID:$GID ./backend . EXPOSE 8080 -HEALTHCHECK CMD curl --silent --fail http://localhost:8080/health | jq -e '.status == true' || exit 1 +HEALTHCHECK CMD curl --silent --fail http://localhost:${PORT:-8080}/health | jq -ne 'input.status == true' || exit 1 USER $UID:$GID