simplify compose: add healthcheck and depends_on condition

This commit is contained in:
gustavooth
2026-07-23 23:09:10 -03:00
parent 599625e2eb
commit ad0ac51d0f
+8 -1
View File
@@ -8,6 +8,12 @@ services:
MARIADB_ROOT_PASSWORD: ${MARIADB_ROOT_PASSWORD}
volumes:
- db_data:/var/lib/mysql
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
interval: 10s
timeout: 5s
retries: 10
start_period: 30s
wordpress:
container_name: gustavoo-me
@@ -24,7 +30,8 @@ services:
- ./wp-content/themes:/var/www/html/wp-content/themes
- ./wp-content/plugins:/var/www/html/wp-content/plugins
depends_on:
- db
db:
condition: service_healthy
volumes:
db_data: