examples: add healthchecks and service_healthy depends_on to mariadb apache

Closes #2250

Signed-off-by: Neha Goud <nehagoud300@gmail.com>
pull/2565/head
Neha Goud 2 months ago
parent 17c2c59ddc
commit e5fc179413

@ -15,12 +15,24 @@ services:
- MARIADB_DISABLE_UPGRADE_BACKUP=1
env_file:
- db.env
healthcheck:
test: ["CMD", "healthcheck.sh", "--innodb_initialized"]
interval: 30s
timeout: 10s
retries: 5
start_period: 30s
# Note: Redis is an external service. You can find more information about the configuration here:
# https://hub.docker.com/_/redis
redis:
image: redis:alpine
restart: always
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 30s
timeout: 5s
retries: 5
start_period: 10s
app:
image: nextcloud:apache
@ -36,8 +48,10 @@ services:
env_file:
- db.env
depends_on:
- db
- redis
db:
condition: service_healthy
redis:
condition: service_healthy
cron:
image: nextcloud:apache

Loading…
Cancel
Save