feat: add a healthcheck script that works with a dynamic port (#2510)

This commit is contained in:
Andrew Kennedy
2023-07-22 14:07:15 -07:00
committed by GitHub
parent a664ba1f9d
commit ff4375cf6c
2 changed files with 9 additions and 2 deletions

View File

@@ -1,10 +1,14 @@
FROM alpine:latest
RUN apk --update add ca-certificates \
mailcap \
curl
curl \
jq
COPY healthcheck.sh /healthcheck.sh
RUN chmod +x /healthcheck.sh # Make the script executable
HEALTHCHECK --start-period=2s --interval=5s --timeout=3s \
CMD curl -f http://localhost/health || exit 1
CMD /healthcheck.sh || exit 1
VOLUME /srv
EXPOSE 80