fix: relax api→postgres dependency to service_started+restart
depends_on: condition: service_healthy on the api service was failing during docker compose up because postgres hasn't completed its healthcheck yet (start_period=30s). Changed to condition: service_started with restart: true so the API starts as soon as postgres is running and retries if the DB isn't ready yet. The .NET backend already handles transient DB connection failures.
This commit is contained in:
+2
-1
@@ -63,7 +63,8 @@ services:
|
|||||||
- host.docker.internal:host-gateway
|
- host.docker.internal:host-gateway
|
||||||
depends_on:
|
depends_on:
|
||||||
postgres:
|
postgres:
|
||||||
condition: service_healthy
|
condition: service_started
|
||||||
|
restart: true
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:8080/health/live || exit 1"]
|
test: ["CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:8080/health/live || exit 1"]
|
||||||
interval: 30s
|
interval: 30s
|
||||||
|
|||||||
Reference in New Issue
Block a user