mirror of
https://gitee.com/dify_ai/dify.git
synced 2024-12-04 04:07:47 +08:00
feat: add health check and depend condition in docker compose (#1113)
This commit is contained in:
parent
c4d8bdc3db
commit
d9866489f0
@ -114,9 +114,12 @@ services:
|
|||||||
# The sample rate for Sentry profiles. Default: `1.0`
|
# The sample rate for Sentry profiles. Default: `1.0`
|
||||||
SENTRY_PROFILES_SAMPLE_RATE: 1.0
|
SENTRY_PROFILES_SAMPLE_RATE: 1.0
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
db:
|
||||||
- redis
|
condition: service_healthy
|
||||||
- weaviate
|
redis:
|
||||||
|
condition: service_healthy
|
||||||
|
weaviate:
|
||||||
|
condition: service_started
|
||||||
volumes:
|
volumes:
|
||||||
# Mount the storage directory to the container, for storing user files.
|
# Mount the storage directory to the container, for storing user files.
|
||||||
- ./volumes/app/storage:/app/api/storage
|
- ./volumes/app/storage:/app/api/storage
|
||||||
@ -167,9 +170,12 @@ services:
|
|||||||
# the api-key for resend (https://resend.com)
|
# the api-key for resend (https://resend.com)
|
||||||
RESEND_API_KEY: ''
|
RESEND_API_KEY: ''
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
db:
|
||||||
- redis
|
condition: service_healthy
|
||||||
- weaviate
|
redis:
|
||||||
|
condition: service_healthy
|
||||||
|
weaviate:
|
||||||
|
condition: service_started
|
||||||
volumes:
|
volumes:
|
||||||
# Mount the storage directory to the container, for storing user files.
|
# Mount the storage directory to the container, for storing user files.
|
||||||
- ./volumes/app/storage:/app/api/storage
|
- ./volumes/app/storage:/app/api/storage
|
||||||
@ -206,6 +212,11 @@ services:
|
|||||||
- ./volumes/db/data:/var/lib/postgresql/data
|
- ./volumes/db/data:/var/lib/postgresql/data
|
||||||
ports:
|
ports:
|
||||||
- "5432:5432"
|
- "5432:5432"
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "pg_isready"]
|
||||||
|
interval: 1s
|
||||||
|
timeout: 3s
|
||||||
|
retries: 30
|
||||||
|
|
||||||
# The redis cache.
|
# The redis cache.
|
||||||
redis:
|
redis:
|
||||||
@ -216,6 +227,8 @@ services:
|
|||||||
- ./volumes/redis/data:/data
|
- ./volumes/redis/data:/data
|
||||||
# Set the redis password when startup redis server.
|
# Set the redis password when startup redis server.
|
||||||
command: redis-server --requirepass difyai123456
|
command: redis-server --requirepass difyai123456
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "redis-cli","ping"]
|
||||||
|
|
||||||
# The Weaviate vector store.
|
# The Weaviate vector store.
|
||||||
weaviate:
|
weaviate:
|
||||||
|
Loading…
Reference in New Issue
Block a user