From 094eb3a852b3ba735e6b5bf4dd3e13260283c4a1 Mon Sep 17 00:00:00 2001 From: Niklas Krieger Date: Tue, 8 Oct 2024 05:52:51 +0200 Subject: [PATCH] add healthcheck --- scripts/build-test-docker/docker-compose.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/build-test-docker/docker-compose.yml b/scripts/build-test-docker/docker-compose.yml index 8cee235c5..11c96d934 100644 --- a/scripts/build-test-docker/docker-compose.yml +++ b/scripts/build-test-docker/docker-compose.yml @@ -9,12 +9,17 @@ services: MYSQL_ROOT_PASSWORD: test-sql-password networks: - tms_db + healthcheck: + test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"] + timeout: 20s + retries: 10 tms-server: image: TMS-Uni-Stuttgart/tms-test:0.0.0-pre container_name: tms-test depends_on: - - sql-db + sql-db: + condition: service_healthy ports: - '8080:8080' networks: