fix: add DB healthcheck and service_healthy condition to prevent lactose startup race condition
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user