From abd17f83a18070d70e08567d10dcaa1983f6806e Mon Sep 17 00:00:00 2001 From: Abrar Ahmad Date: Thu, 8 Sep 2022 21:18:59 +0500 Subject: [PATCH] add mssql health checks (#939) --- docker-compose.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 7b635637..116b48f1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -12,6 +12,8 @@ services: condition: service_healthy redis: condition: service_healthy + # mssql: + # condition: service_healthy volumes: - .:/var/www/html:delegated environment: @@ -74,4 +76,8 @@ services: environment: - ACCEPT_EULA=Y - SA_PASSWORD=P@ssword # todo reuse values from env above - # todo missing health check + healthcheck: + test: /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P P@ssword -Q "SELECT 1" -b -o /dev/null + interval: 10s + timeout: 10s + retries: 10