diff options
author | Sylvia van Os <sylvia@hackerchick.me> | 2022-01-29 13:25:29 +0100 |
---|---|---|
committer | Sylvia van Os <sylvia@hackerchick.me> | 2022-04-13 19:03:06 +0200 |
commit | 8355426311ac87cf85cf9c1f20e068f4b801c6b2 (patch) | |
tree | 32c7c79f4ab99ea2e8d97e1d809839a43568694e | |
parent | dcf058fb559e7918cd77f5f1bb0dfdbcee813571 (diff) |
Add healthcheck
This checks if status.php returns succesfully to determine if the
Nextcloud instance is health.
Signed-off-by: Sylvia van Os <sylvia@hackerchick.me>
-rw-r--r-- | Dockerfile-alpine.template | 1 | ||||
-rw-r--r-- | Dockerfile-debian.template | 1 |
2 files changed, 2 insertions, 0 deletions
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%%"] |