fix: add DB healthcheck and service_healthy condition to prevent lactose startup race condition

This commit is contained in:
2026-07-06 01:51:49 +02:00
parent e2041dd2c9
commit 8c5b4895ac

View File

@@ -15,7 +15,8 @@
ports:
- "5162:8080"
depends_on:
- database
database:
condition: service_healthy
volumes:
#- "/root/MilkyShots/storageImages:/diary:ro"
- "./storageImages:/diary:ro"
@@ -34,6 +35,12 @@
- "pg_dbdata:/var/lib/postgresql/data"
ports:
- "3306:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U root -d TestDb"]
interval: 3s
timeout: 5s
retries: 10
start_period: 10s
milkstream:
image: milkstream