healthchecks #32

Merged
moritz merged 8 commits from healthchecks into main 2023-01-12 21:16:32 +00:00
1 changed files with 8 additions and 0 deletions
Showing only changes of commit 6997636275 - Show all commits

View File

@ -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<"']
moritz marked this conversation as resolved Outdated

localhost/ocs/v2.php/apps/serverinfo/api/v1/info There's two version strings in this URI? I wonder if they'll change? Could be some breakages here... any other way to do it?

`localhost/ocs/v2.php/apps/serverinfo/api/v1/info` There's two version strings in this URI? I wonder if they'll change? Could be some breakages here... any other way to do it?

This uses the https://github.com/nextcloud/serverinfo app, which is installed per default. It is able to check the nextcloud health in more depth.
https://github.com/nextcloud/docker/issues/676
But I can't guarantee that this app won't change in future.
A more future prove approach is to use /status.php as for the php-fpm healthcheck.

This uses the https://github.com/nextcloud/serverinfo app, which is installed per default. It is able to check the nextcloud health in more depth. https://github.com/nextcloud/docker/issues/676 But I can't guarantee that this app won't change in future. A more future prove approach is to use /status.php as for the php-fpm healthcheck.
interval: 30s
timeout: 10s
retries: 10
start_period: 1m
app:
image: nextcloud:25.0.1-fpm