From 59bbff23fe203c39571ad8cb61150e48a73495b1 Mon Sep 17 00:00:00 2001 From: szaimen Date: Mon, 5 Sep 2022 13:23:40 +0200 Subject: [PATCH] improve healthcheck for mastercontainer Signed-off-by: szaimen --- Containers/mastercontainer/Dockerfile | 6 ++++-- Containers/mastercontainer/healthcheck.sh | 5 +++++ 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 Containers/mastercontainer/healthcheck.sh diff --git a/Containers/mastercontainer/Dockerfile b/Containers/mastercontainer/Dockerfile index 37442eb2..9b9b764e 100644 --- a/Containers/mastercontainer/Dockerfile +++ b/Containers/mastercontainer/Dockerfile @@ -90,16 +90,18 @@ COPY session-deduplicator.sh / COPY cron.sh / COPY daily-backup.sh / COPY supervisord.conf / +COPY healthcheck.sh / RUN chmod +x /usr/bin/start.sh; \ chmod +x /cron.sh; \ chmod +x /session-deduplicator.sh; \ chmod +x /backup-time-file-watcher.sh; \ chmod +x /daily-backup.sh; \ - chmod a+r /Caddyfile + chmod a+r /Caddyfile; \ + chmod +x /healthcheck.sh USER root ENTRYPOINT ["start.sh"] CMD ["/usr/bin/supervisord", "-c", "/supervisord.conf"] -HEALTHCHECK CMD curl -skfI https://localhost:8080 || exit 1 \ No newline at end of file +HEALTHCHECK CMD /healthcheck.sh \ No newline at end of file diff --git a/Containers/mastercontainer/healthcheck.sh b/Containers/mastercontainer/healthcheck.sh new file mode 100644 index 00000000..3a0d0b33 --- /dev/null +++ b/Containers/mastercontainer/healthcheck.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +if [ -f "/mnt/docker-aio-config/data/configuration.json" ]; then + curl -skfI https://localhost:8080 || exit 1 +fi