Using Healthcheck
Complete healthcheck.sh Docker reference: --connect, --innodb_initialized, --replication_* checks, .my-healthcheck.cnf config, and environment variables.
Using Healthcheck.sh
Compose File Example
version: "3"
services:
mariadb:
image: mariadb:lts
environment:
- MARIADB_DATABASE=testdb
- MARIADB_USER=testuser
- MARIADB_PASSWORD=password
- MARIADB_RANDOM_ROOT_PASSWORD=1
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
start_period: 10s
interval: 10s
timeout: 5s
retries: 3
wordpress:
image: wordpress
environment:
- WORDPRESS_DB_HOST=mariadb
- WORDPRESS_DB_NAME=testdb
- WORDPRESS_DB_USER=testuser
- WORDPRESS_DB_PASSWORD=password
depends_on:
mariadb:
condition: service_healthyTests
Health Check Flag
Description
Required Privileges
Parameters
Parameter
Description
Examples
Last updated
Was this helpful?

