Fix backend startup: add retry logic for DB init, proper logging, ensure all models imported before create_all, increase healthcheck start_period
This commit is contained in:
parent
00c58c6f62
commit
16d00fbd1b
3 changed files with 45 additions and 13 deletions
|
|
@ -10,6 +10,7 @@ services:
|
|||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 10s
|
||||
|
||||
backend:
|
||||
build: ./backend
|
||||
|
|
@ -27,9 +28,10 @@ services:
|
|||
condition: service_healthy
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8000/api/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
start_period: 30s
|
||||
|
||||
db:
|
||||
image: postgres:16-alpine
|
||||
|
|
@ -45,6 +47,7 @@ services:
|
|||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
start_period: 10s
|
||||
|
||||
volumes:
|
||||
fitness_db_data:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue