From 8355426311ac87cf85cf9c1f20e068f4b801c6b2 Mon Sep 17 00:00:00 2001 From: Sylvia van Os Date: Sat, 29 Jan 2022 13:25:29 +0100 Subject: [PATCH] Add healthcheck This checks if status.php returns succesfully to determine if the Nextcloud instance is health. Signed-off-by: Sylvia van Os --- Dockerfile-alpine.template | 1 + Dockerfile-debian.template | 1 + 2 files changed, 2 insertions(+) diff --git a/Dockerfile-alpine.template b/Dockerfile-alpine.template index 38e00615..5322a60a 100644 --- a/Dockerfile-alpine.template +++ b/Dockerfile-alpine.template @@ -129,5 +129,6 @@ RUN set -ex; \ COPY *.sh upgrade.exclude / COPY config/* /usr/src/nextcloud/config/ +HEALTHCHECK CMD ["curl", "--fail", "http://localhost/status.php"] ENTRYPOINT ["/entrypoint.sh"] CMD ["%%CMD%%"] diff --git a/Dockerfile-debian.template b/Dockerfile-debian.template index e6c48d54..3b43546b 100644 --- a/Dockerfile-debian.template +++ b/Dockerfile-debian.template @@ -147,5 +147,6 @@ RUN set -ex; \ COPY *.sh upgrade.exclude / COPY config/* /usr/src/nextcloud/config/ +HEALTHCHECK CMD ["curl", "--fail", "http://localhost/status.php"] ENTRYPOINT ["/entrypoint.sh"] CMD ["%%CMD%%"]