From 894b1c5559cd56876d7e94c16377537b48b88a79 Mon Sep 17 00:00:00 2001 From: eikendev Date: Thu, 28 May 2020 10:44:28 +0200 Subject: [PATCH] Support custom ports in Docker healthcheck --- docker/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 0e737492..c7741624 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,7 +1,8 @@ FROM frolvlad/alpine-glibc:glibc-2.31 +ENV GOTIFY_SERVER_PORT="80" WORKDIR /app RUN apk add --no-cache ca-certificates tzdata curl 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 ENTRYPOINT ["./gotify-app"]