Skip to content

Commit 6c47baf

Browse files
committed
fix: healthcheck definition for backend service
- Use the service name (backend) instead of localhost. - Increase the interval, timeout, and retries for the health check.
1 parent a94a10f commit 6c47baf

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

compose.yaml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,30 +36,23 @@ services:
3636
environment:
3737
- APP_ENV=${APP_ENV}
3838
- BACKEND_PORT=${BACKEND_PORT}
39-
4039
- AWS_REGION
4140
- AWS_ACCESS_KEY_ID
4241
- AWS_SECRET_ACCESS_KEY
43-
4442
- BUCKETNAME
45-
4643
- USER_ENCRYPTION_KEY
47-
4844
- GMAIL_EMAIL
4945
- GMAIL_PASSWORD
50-
5146
- STRIPE_SECRET_KEY
52-
5347
- REDIS_ADDR
5448
- REDIS_DB
5549
- REDIS_PASSWORD
56-
5750
- FRONTEND_ORIGIN=frontend:${PORT}
5851
healthcheck:
59-
test: ["CMD", "curl", "-f", "http://localhost:${BACKEND_PORT}/healthz"]
60-
interval: 30s
61-
timeout: 10s
62-
retries: 3
52+
test: ["CMD", "curl", "-f", "http://backend:${BACKEND_PORT}/healthz"]
53+
interval: 60s
54+
timeout: 30s
55+
retries: 5
6356

6457
redis:
6558
image: redis:latest

0 commit comments

Comments
 (0)