Add nextcloud healthchecks
This commit is contained in:
@@ -6,14 +6,21 @@ services:
|
|||||||
container_name: nextcloud
|
container_name: nextcloud
|
||||||
restart: always
|
restart: always
|
||||||
depends_on:
|
depends_on:
|
||||||
- nextcloud_db
|
nextcloud_db:
|
||||||
- nextcloud_redis
|
condition: service_healthy
|
||||||
|
nextcloud_redis:
|
||||||
|
condition: service_healthy
|
||||||
environment:
|
environment:
|
||||||
- POSTGRES_HOST=nextcloud_db
|
- POSTGRES_HOST=nextcloud_db
|
||||||
- POSTGRES_DB=nextcloud
|
- POSTGRES_DB=nextcloud
|
||||||
- POSTGRES_USER=nextcloud
|
- POSTGRES_USER=nextcloud
|
||||||
- POSTGRES_PASSWORD=${DB_PASSWORD}
|
- POSTGRES_PASSWORD=${DB_PASSWORD}
|
||||||
- REDIS_HOST=nextcloud_redis
|
- REDIS_HOST=nextcloud_redis
|
||||||
|
healthcheck:
|
||||||
|
test: curl -f http://localhost/status.php || exit 1
|
||||||
|
interval: 30s
|
||||||
|
timeout: 10s
|
||||||
|
retries: 3
|
||||||
networks:
|
networks:
|
||||||
- default
|
- default
|
||||||
- traefik
|
- traefik
|
||||||
@@ -29,6 +36,11 @@ services:
|
|||||||
- POSTGRES_DB=nextcloud
|
- POSTGRES_DB=nextcloud
|
||||||
- POSTGRES_USER=nextcloud
|
- POSTGRES_USER=nextcloud
|
||||||
- POSTGRES_PASSWORD=${DB_PASSWORD}
|
- POSTGRES_PASSWORD=${DB_PASSWORD}
|
||||||
|
healthcheck:
|
||||||
|
test: pg_isready
|
||||||
|
interval: 30s
|
||||||
|
timeout: 10s
|
||||||
|
retries: 3
|
||||||
networks:
|
networks:
|
||||||
- default
|
- default
|
||||||
volumes:
|
volumes:
|
||||||
@@ -38,6 +50,11 @@ services:
|
|||||||
image: redis:8
|
image: redis:8
|
||||||
container_name: nextcloud_redis
|
container_name: nextcloud_redis
|
||||||
restart: always
|
restart: always
|
||||||
|
healthcheck:
|
||||||
|
test: redis-cli ping
|
||||||
|
interval: 30s
|
||||||
|
timeout: 10s
|
||||||
|
retries: 3
|
||||||
networks:
|
networks:
|
||||||
- default
|
- default
|
||||||
volumes:
|
volumes:
|
||||||
|
|||||||
Reference in New Issue
Block a user