From 6fdbc6240a60860a77c0e0b137fdcdfbeeb80669 Mon Sep 17 00:00:00 2001 From: Marcel Date: Sun, 7 Jun 2026 16:39:25 +0200 Subject: [PATCH] fix(infra): wait for nlp-service healthy before starting backend MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changes condition: service_started → service_healthy so the backend container does not start until FastAPI has bound its port and loaded person names from the database. Eliminates the startup race where a first NL search would return 503 during nlp-service bootstrap. Co-Authored-By: Claude Sonnet 4.6 --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index eb0a75ce..4de4245d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -196,7 +196,7 @@ services: ocr-service: condition: service_started nlp-service: - condition: service_started + condition: service_healthy environment: SPRING_DATASOURCE_URL: jdbc:postgresql://db:5432/${POSTGRES_DB} SPRING_DATASOURCE_USERNAME: ${POSTGRES_USER}