From 92b6e0da10aeff09c7049e7584d5f25e029013f3 Mon Sep 17 00:00:00 2001 From: Felix Bartels Date: Fri, 19 Oct 2018 16:48:19 +0200 Subject: [PATCH] update docker-file while it did not work out to depend in the health status of mysql for the start of kopano-server, its nevertheless an interesting value. since the dockerfile does not include an automatic healcheak, add it to the compose file. Signed-off-by: Felix Bartels --- docker-compose.yml-example | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml-example b/docker-compose.yml-example index f3f1b26..07fc89d 100644 --- a/docker-compose.yml-example +++ b/docker-compose.yml-example @@ -79,6 +79,11 @@ services: - MYSQL_PASSWORD=YOUR_PASSWORD #change here - MYSQL_DATABASE=kopano - MYSQL_USER=kopano + healthcheck: + test: ["CMD-SHELL", 'mysql --database=$$MYSQL_DATABASE --password=$$MYSQL_ROOT_PASSWORD --execute="SELECT count(table_name) > 0 FROM information_schema.tables;" --skip-column-names -B'] + interval: 30s + timeout: 10s + retries: 4 networks: - kopanonet @@ -111,7 +116,8 @@ services: links: - db depends_on: - - "kssl" + - db + - kssl environment: - SERVICE_TO_START=server - TZ=Europe/Berlin