fix(infra): wait for nlp-service healthy before starting backend

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 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-06-07 16:39:25 +02:00
committed by marcel
parent 3d2b907fb4
commit 644b7c2683

View File

@@ -196,7 +196,7 @@ services:
ocr-service: ocr-service:
condition: service_started condition: service_started
nlp-service: nlp-service:
condition: service_started condition: service_healthy
environment: environment:
SPRING_DATASOURCE_URL: jdbc:postgresql://db:5432/${POSTGRES_DB} SPRING_DATASOURCE_URL: jdbc:postgresql://db:5432/${POSTGRES_DB}
SPRING_DATASOURCE_USERNAME: ${POSTGRES_USER} SPRING_DATASOURCE_USERNAME: ${POSTGRES_USER}