Support custom ports in Docker healthcheck

This commit is contained in:
eikendev 2020-05-28 10:44:28 +02:00 committed by Jannis Mattheis
parent 93b30c5c44
commit 894b1c5559
1 changed files with 2 additions and 1 deletions

View File

@ -1,7 +1,8 @@
FROM frolvlad/alpine-glibc:glibc-2.31 FROM frolvlad/alpine-glibc:glibc-2.31
ENV GOTIFY_SERVER_PORT="80"
WORKDIR /app WORKDIR /app
RUN apk add --no-cache ca-certificates tzdata curl RUN apk add --no-cache ca-certificates tzdata curl
ADD gotify-app /app/ ADD gotify-app /app/
HEALTHCHECK --interval=30s --timeout=5s --start-period=5s CMD curl --fail http://localhost:80/health || exit 1 HEALTHCHECK --interval=30s --timeout=5s --start-period=5s CMD curl --fail http://localhost:$GOTIFY_SERVER_PORT/health || exit 1
EXPOSE 80 EXPOSE 80
ENTRYPOINT ["./gotify-app"] ENTRYPOINT ["./gotify-app"]