added healthchecks and removed exposed password from compose.yaml
This commit is contained in:
+26
-1
@@ -2,6 +2,7 @@
|
||||
services:
|
||||
nextcloud-app:
|
||||
build: .
|
||||
image: local-nextcloud
|
||||
container_name: nextcloud_app
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
@@ -31,6 +32,12 @@ services:
|
||||
- postgre-general
|
||||
- nextcloud-network
|
||||
- reverse_proxy_default
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "curl -f http://localhost:80/status.php | grep -q '\"installed\":true' || exit 1"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
start_period: 10s
|
||||
|
||||
nextcloud-redis:
|
||||
image: redis:alpine # Essential for file locking, uses almost no RAM (~20MB)
|
||||
@@ -39,9 +46,16 @@ services:
|
||||
command: redis-server --requirepass ${REDIS_PASS}
|
||||
networks:
|
||||
- nextcloud-network
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "redis-cli -a ${REDIS_PASS} ping | grep PONG || exit 1"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
start_period: 5s
|
||||
|
||||
nextcloud-cron:
|
||||
image: nextcloud:latest
|
||||
build: .
|
||||
image: local-nextcloud
|
||||
container_name: nextcloud_cron
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
@@ -52,6 +66,17 @@ services:
|
||||
networks:
|
||||
- nextcloud-network
|
||||
- postgre-general
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "LC_ALL=C; [ $$(($$(date +%s) - $$(runuser -u www-data -- php /var/www/html/occ config:app:get core lastcron))) -le 900 ] || exit 1"]
|
||||
interval: 5m
|
||||
timeout: 15s
|
||||
retries: 3
|
||||
start_period: 2m
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
networks:
|
||||
|
||||
Reference in New Issue
Block a user