fix: add healthcheck configurations for app, postgres, and redis services in docker-compose
Build and deploy / build (push) Successful in 11s Details
Build and deploy / deploy (push) Successful in 17s Details

This commit is contained in:
k1nq 2025-11-30 00:33:50 +05:00
parent 373b42768c
commit 2fcf75b859
1 changed files with 26 additions and 0 deletions

View File

@ -25,6 +25,12 @@ services:
ANALYTICS_CACHE_BACKOFF_MS: ${ANALYTICS_CACHE_BACKOFF_MS}
ports:
- "80:8000"
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:8000/health"]
interval: 30s
timeout: 5s
retries: 5
start_period: 10s
depends_on:
postgres:
condition: service_started
@ -56,6 +62,20 @@ services:
volumes:
- /mnt/data/postgres:/var/lib/postgresql/data
restart: unless-stopped
healthcheck:
test:
[
"CMD",
"pg_isready",
"-U",
"${DB_USER}",
"-d",
"${DB_NAME}",
]
interval: 30s
timeout: 5s
retries: 5
start_period: 10s
redis:
image: redis:7-alpine
@ -63,3 +83,9 @@ services:
restart: unless-stopped
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 30s
timeout: 5s
retries: 5
start_period: 5s