Skip to content

Commit

Permalink
feat: add health check for pg and redis in docker-compose.middleware.…
Browse files Browse the repository at this point in the history
  • Loading branch information
hwzhuhao authored Sep 4, 2024
1 parent c2a3c5a commit 83e8486
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docker/docker-compose.middleware.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ services:
- ./volumes/db/data:/var/lib/postgresql/data
ports:
- "${EXPOSE_POSTGRES_PORT:-5432}:5432"
healthcheck:
test: [ "CMD", "pg_isready" ]
interval: 1s
timeout: 3s
retries: 30

# The redis cache.
redis:
Expand All @@ -31,6 +36,8 @@ services:
command: redis-server --requirepass difyai123456
ports:
- "${EXPOSE_REDIS_PORT:-6379}:6379"
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]

# The DifySandbox
sandbox:
Expand Down

0 comments on commit 83e8486

Please sign in to comment.