From 7c5888179c691e8d04e80d14ea619a6739840fb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio?= Date: Fri, 20 Jan 2023 17:01:18 +0200 Subject: [PATCH] Add fallback to PORT in healthcheck (#249) --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 3187239..36e5681 100644 --- a/Dockerfile +++ b/Dockerfile @@ -49,5 +49,5 @@ RUN python manage.py collectstatic --noinput && \ # Launch USER appuser EXPOSE 8080 -HEALTHCHECK CMD bash -c 'wget -o /dev/null -O /dev/null --header "Host: ${ALLOWED_HOSTS%%,*}" "http://127.0.0.1:$PORT/healthz/?format=json"' +HEALTHCHECK CMD bash -c 'wget -o /dev/null -O /dev/null --header "Host: ${ALLOWED_HOSTS%%,*}" "http://127.0.0.1:${PORT:-8080}/healthz/?format=json"' CMD [ "./entrypoint.sh" ]