Add fallback to PORT in healthcheck (#249)

This commit is contained in:
Sérgio
2023-01-20 17:01:18 +02:00
committed by GitHub
parent 2d7bbcaa8b
commit 7c5888179c

View File

@@ -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" ]