feat: add health check endpoint and update Docker Compose healthcheck configuration

This commit is contained in:
2026-03-19 22:31:11 -03:00
parent 39f024f98d
commit 36dec0d6a7
2 changed files with 13 additions and 2 deletions
+7 -1
View File
@@ -26,8 +26,14 @@ services:
environment:
DATABASE_URL: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}
ports:
- "${PORT:-8080}:8080"
- "${PORT:-8080}:${PORT:-8080}"
depends_on:
db:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:${PORT:-8080}/health || exit 1"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s