fix: add health checks for backend and frontend services in docker-compose
Some checks failed
Build and Deploy Thoughts / build-and-deploy-local (push) Failing after 58s

This commit is contained in:
2025-09-09 03:56:06 +02:00
parent 8536e52590
commit cbca1058a2

View File

@@ -33,6 +33,11 @@ services:
depends_on:
database:
condition: service_healthy
healthcheck:
test: ["CMD", "wget", "-q", "--spider", "http://localhost:8000/health"]
interval: 10s
timeout: 5s
retries: 5
networks:
- internal
@@ -42,6 +47,11 @@ services:
restart: unless-stopped
depends_on:
- backend
healthcheck:
test: ["CMD", "nc", "-z", "localhost", "3000"]
interval: 10s
timeout: 5s
retries: 5
environment:
- NEXT_PUBLIC_SERVER_SIDE_API_URL=http://proxy/api
networks:
@@ -52,8 +62,10 @@ services:
image: custom-proxy:latest
restart: unless-stopped
depends_on:
- frontend
- backend
frontend:
condition: service_healthy
backend:
condition: service_healthy
networks:
- internal
- traefik