From ed5483500aa04d528ceb6ace165efe3bbbde765d Mon Sep 17 00:00:00 2001 From: Simon L Date: Mon, 2 Jan 2023 18:24:17 +0100 Subject: [PATCH] Address review Signed-off-by: Simon L Co-Authored-By: Zoey --- Containers/nextcloud/Dockerfile | 4 ++-- Containers/nextcloud/healthcheck.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Containers/nextcloud/Dockerfile b/Containers/nextcloud/Dockerfile index 66f0eb6f..881ee0c6 100644 --- a/Containers/nextcloud/Dockerfile +++ b/Containers/nextcloud/Dockerfile @@ -251,7 +251,7 @@ RUN set -ex; \ chmod +x /notify.sh && \ chmod +x /notify-all.sh && \ chmod +x /activate-collabora.sh && \ - chmod +x healthcheck.sh + chmod +x /healthcheck.sh RUN set -ex; \ mkdir /mnt/ncdata; \ @@ -265,4 +265,4 @@ RUN echo "root:$(openssl rand -base64 12)" | chpasswd USER root ENTRYPOINT ["/start.sh"] -HEALTHCHECK CMD /healthcheck.sh +HEALTHCHECK CMD sudo -E -u www-data bash /healthcheck.sh diff --git a/Containers/nextcloud/healthcheck.sh b/Containers/nextcloud/healthcheck.sh index 960ee6c7..df87360c 100644 --- a/Containers/nextcloud/healthcheck.sh +++ b/Containers/nextcloud/healthcheck.sh @@ -1,7 +1,7 @@ #!/bin/bash -sudo -u www-data nc -z "$POSTGRES_HOST" 5432 || exit 0 +nc -z "$POSTGRES_HOST" 5432 || exit 0 -if ! sudo -u www-data nc -z localhost 9000 || ! sudo -u www-data nc -z localhost 7867; then +if ! nc -z localhost 9000 || ! nc -z localhost 7867; then exit 1 fi