From 1e6f12994172df5c2d0749e0d6448b638f605df8 Mon Sep 17 00:00:00 2001 From: Amirhossein Khalili Date: Sun, 20 Sep 2026 10:40:39 +0330 Subject: [PATCH] fix(docker): gate services on healthy dependencies --- docker-compose.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index e6dc237..4b7679b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -81,6 +81,11 @@ services: condition: service_healthy clickhouse: condition: service_healthy + healthcheck: + test: ["CMD", "python", "-c", "from app.common.bootstrap import SCHEMA; assert SCHEMA.is_file()"] + interval: 5s + timeout: 5s + retries: 3 restart: "no" api: @@ -92,6 +97,10 @@ services: - "${API_PORT:-8000}:${API_PORT:-8000}" stop_grace_period: 60s depends_on: + redpanda: + condition: service_healthy + clickhouse: + condition: service_healthy init: condition: service_completed_successfully healthcheck: @@ -109,6 +118,10 @@ services: - "${WORKER_STATS_PORT:-8001}:${WORKER_STATS_PORT:-8001}" stop_grace_period: 60s depends_on: + redpanda: + condition: service_healthy + clickhouse: + condition: service_healthy init: condition: service_completed_successfully healthcheck: