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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -49,5 +49,5 @@ RUN python manage.py collectstatic --noinput && \
# Launch # Launch
USER appuser USER appuser
EXPOSE 8080 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" ] CMD [ "./entrypoint.sh" ]