From 69976362757c3f7c9e258eb8d892af37606a820e Mon Sep 17 00:00:00 2001 From: Moritz Date: Tue, 10 Jan 2023 17:41:08 +0100 Subject: [PATCH] web healthcheck --- compose.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/compose.yml b/compose.yml index 341ffd1..16f36ce 100644 --- a/compose.yml +++ b/compose.yml @@ -33,6 +33,14 @@ services: - "traefik.http.routers.${STACK_NAME}.middlewares=${STACK_NAME}-redirect" - "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLForceHost=true" - "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLHost=${DOMAIN}" + secrets: + - admin_password + healthcheck: + test: ["CMD-SHELL", 'curl -s -N --user admin:$$(cat /run/secrets/admin_password) localhost/ocs/v2.php/apps/serverinfo/api/v1/info | grep "statuscode>200<"'] + interval: 30s + timeout: 10s + retries: 10 + start_period: 1m app: image: nextcloud:25.0.1-fpm