healthchecks #32
|
@ -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
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 10
|
||||
start_period: 1m
|
||||
|
||||
app:
|
||||
image: nextcloud:25.0.1-fpm
|
||||
|
|
Loading…
Reference in New Issue
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.