From 9dbfbb74af8224fa9a8c04aff59e7f7444a5aabe Mon Sep 17 00:00:00 2001 From: Janos SUTO Date: Tue, 9 Feb 2021 07:47:31 +0100 Subject: [PATCH] Added healthcheck to mysql container Signed-off-by: Janos SUTO --- docker/docker-compose.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docker/docker-compose.yaml b/docker/docker-compose.yaml index c888c56a..88543b12 100644 --- a/docker/docker-compose.yaml +++ b/docker/docker-compose.yaml @@ -16,6 +16,12 @@ services: - MYSQL_PASSWORD=piler123 - MYSQL_RANDOM_ROOT_PASSWORD=yes command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci + healthcheck: + test: mysql --user=piler --password=piler123 piler --execute "show tables" + interval: "60s" + timeout: "5s" + start_period: "15s" + retries: 3 volumes: - db_data:/var/lib/mysql