From 045064f8b8bf9f86058e877448085e38da8b3f2e Mon Sep 17 00:00:00 2001 From: Eden Yemini Date: Thu, 30 Jan 2025 11:29:14 +0200 Subject: [PATCH] fix: add proper healthcheck for S6 containers (#3691) Co-authored-by: Oleg Lobanov --- Dockerfile.s6 | 11 ++++++++--- Dockerfile.s6.aarch64 | 11 ++++++++--- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/Dockerfile.s6 b/Dockerfile.s6 index 63c43018..609a2634 100644 --- a/Dockerfile.s6 +++ b/Dockerfile.s6 @@ -2,15 +2,20 @@ FROM ghcr.io/linuxserver/baseimage-alpine:3.20 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 # copy local files COPY docker/root/ / +RUN ln -s /config/settings.json /.filebrowser.json COPY filebrowser /usr/bin/filebrowser # ports and volumes VOLUME /srv /config /database -EXPOSE 80 \ No newline at end of file +EXPOSE 80 diff --git a/Dockerfile.s6.aarch64 b/Dockerfile.s6.aarch64 index 752e3ed3..1e62391e 100644 --- a/Dockerfile.s6.aarch64 +++ b/Dockerfile.s6.aarch64 @@ -2,15 +2,20 @@ FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.20 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 # copy local files COPY docker/root/ / +RUN ln -s /config/settings.json /.filebrowser.json COPY filebrowser /usr/bin/filebrowser # ports and volumes VOLUME /srv /config /database -EXPOSE 80 \ No newline at end of file +EXPOSE 80