Add healthcheck to MariaDB container to ensure it is ready to accept external connections before reporting as ready #758

This commit is contained in:
wotnak 2023-12-15 12:04:23 +01:00 committed by Michael Stenta
parent 0e211cb33c
commit 1773a2eae5
1 changed files with 7 additions and 0 deletions

View File

@ -12,6 +12,13 @@ services:
MYSQL_DATABASE: farm
MYSQL_USER: farm
MYSQL_PASSWORD: farm
healthcheck:
test: [ "CMD", "healthcheck.sh", "--connect", "--innodb_initialized" ]
start_period: 1m
start_interval: 10s
interval: 1m
timeout: 5s
retries: 3
www:
depends_on: