Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix: start the plugin daemon after the database has become healthy (#17928)

kurokobobc57fa06190b
diff --git a/docker/docker-compose-template.yaml b/docker/docker-compose-template.yaml
index ef58bf99f39..81314421a8a 100644
--- a/docker/docker-compose-template.yaml
+++ b/docker/docker-compose-template.yaml
@@ -90,10 +90,10 @@ services:
volumes:
- ./volumes/db/data:/var/lib/postgresql/data
healthcheck:
- test: [ 'CMD', 'pg_isready' ]
+ test: [ 'CMD', 'pg_isready', '-h', 'db', '-U', '${PGUSER:-postgres}', '-d', '${POSTGRES_DB:-dify}' ]
interval: 1s
timeout: 3s
- retries: 30
+ retries: 60
# The redis cache.
redis:
@@ -175,7 +175,8 @@ services:
volumes:
- ./volumes/plugin_daemon:/app/storage
depends_on:
- - db
+ db:
+ condition: service_healthy
# ssrf_proxy server
# for more information, please refer to
diff --git a/docker/docker-compose.yaml b/docker/docker-compose.yaml
index 305cf22b209..720b604f7f1 100644
--- a/docker/docker-compose.yaml
+++ b/docker/docker-compose.yaml
@@ -558,10 +558,10 @@ services:
volumes:
- ./volumes/db/data:/var/lib/postgresql/data
healthcheck:
- test: [ 'CMD', 'pg_isready' ]
+ test: [ 'CMD', 'pg_isready', '-h', 'db', '-U', '${PGUSER:-postgres}', '-d', '${POSTGRES_DB:-dify}' ]
interval: 1s
timeout: 3s
- retries: 30
+ retries: 60
# The redis cache.
redis:
@@ -643,7 +643,8 @@ services:
volumes:
- ./volumes/plugin_daemon:/app/storage
depends_on:
- - db
+ db:
+ condition: service_healthy
# ssrf_proxy server
# for more information, please refer to