feat(docker): healthcheck

This commit is contained in:
Pihkaal
2025-12-04 22:29:38 +01:00
parent 56b2312f51
commit 1340acc178
2 changed files with 19 additions and 3 deletions

View File

@@ -10,6 +10,11 @@ services:
- postgres_data:/var/lib/postgresql/data
networks:
- lbf-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres}"]
interval: 5s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
@@ -25,8 +30,10 @@ services:
dockerfile: apps/discord-bot/Dockerfile
restart: unless-stopped
depends_on:
- postgres
- redis
postgres:
condition: service_healthy
redis:
condition: service_started
networks:
- lbf-network
environment: