From 517addc421fc45fd3e10cfdd7f4b8cb574f8ea82 Mon Sep 17 00:00:00 2001 From: Michel Roca Date: Fri, 21 May 2021 21:47:11 +0200 Subject: [PATCH] Use config port for docker healthcheck --- Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8cbc7a5b..54dbf81f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,11 @@ FROM alpine:latest RUN apk --update add ca-certificates \ mailcap \ - curl + curl \ + jq HEALTHCHECK --start-period=2s --interval=5s --timeout=3s \ - CMD curl -f http://localhost/health || exit 1 + CMD curl -f http://localhost:$(jq '.port' /.filebrowser.json)/health || curl -f http://localhost/health || exit 1 VOLUME /srv EXPOSE 80