- Add healthcheck example in compose file.

This commit is contained in:
Arnaud G. GIBERT 2024-10-29 09:10:02 +01:00
parent 17ddc89aa4
commit 1c23ba75b8
2 changed files with 14 additions and 0 deletions

View File

@ -1,3 +1,11 @@
------------------------------------------------------------------------------------------------------------------------------------
Rx3/MariaDB-Mga9 V 1.0.2 - A. GIBERT - 2024/11/xx
------------------------------------------------------------------------------------------------------------------------------------
- Add healthcheck example in compose file.
------------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------------
Rx3/MariaDB-Mga9 V 1.0.1 - A. GIBERT - 2024/10/05 Rx3/MariaDB-Mga9 V 1.0.1 - A. GIBERT - 2024/10/05
------------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------------

View File

@ -30,6 +30,12 @@ services:
MARIADB_USER: ${MARIADB_USER} MARIADB_USER: ${MARIADB_USER}
MARIADB_PASSWORD: ${MARIADB_PASSWORD} MARIADB_PASSWORD: ${MARIADB_PASSWORD}
healthcheck:
test: ["CMD", 'mysqladmin', 'ping', '-h', 'localhost', '-u', 'root', '-p${MARIADB_ROOT_PASSWORD}' ]
interval: 10s
timeout: 3s
retries: 3
volumes: volumes:
- ./var/lib/mysql:/var/lib/mysql - ./var/lib/mysql:/var/lib/mysql