From 052a8534b596b45c98c252b4e00cd116f77482fe Mon Sep 17 00:00:00 2001 From: 3wc <3wc.git@doesthisthing.work> Date: Mon, 28 Sep 2020 22:32:06 +0200 Subject: [PATCH] Add Mariadb healthcheck --- compose.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/compose.yml b/compose.yml index 69d5945..dd71c4c 100644 --- a/compose.yml +++ b/compose.yml @@ -61,6 +61,13 @@ services: - "mariadb:/var/lib/mysql" networks: - internal + healthcheck: + test: 'mysql -p"$$(tr -d "\n" < /run/secrets/db_root_password)"' + interval: 20s + timeout: 2s + retries: 3 + start_period: 30s + secrets: db_root_password: