Skip to content

Commit bc57fa0

Browse files
authored
fix: start the plugin daemon after the database has become healthy (#17928)
1 parent 5d72003 commit bc57fa0

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

docker/docker-compose-template.yaml

+4-3
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,10 @@ services:
9090
volumes:
9191
- ./volumes/db/data:/var/lib/postgresql/data
9292
healthcheck:
93-
test: [ 'CMD', 'pg_isready' ]
93+
test: [ 'CMD', 'pg_isready', '-h', 'db', '-U', '${PGUSER:-postgres}', '-d', '${POSTGRES_DB:-dify}' ]
9494
interval: 1s
9595
timeout: 3s
96-
retries: 30
96+
retries: 60
9797

9898
# The redis cache.
9999
redis:
@@ -175,7 +175,8 @@ services:
175175
volumes:
176176
- ./volumes/plugin_daemon:/app/storage
177177
depends_on:
178-
- db
178+
db:
179+
condition: service_healthy
179180

180181
# ssrf_proxy server
181182
# for more information, please refer to

docker/docker-compose.yaml

+4-3
Original file line numberDiff line numberDiff line change
@@ -558,10 +558,10 @@ services:
558558
volumes:
559559
- ./volumes/db/data:/var/lib/postgresql/data
560560
healthcheck:
561-
test: [ 'CMD', 'pg_isready' ]
561+
test: [ 'CMD', 'pg_isready', '-h', 'db', '-U', '${PGUSER:-postgres}', '-d', '${POSTGRES_DB:-dify}' ]
562562
interval: 1s
563563
timeout: 3s
564-
retries: 30
564+
retries: 60
565565

566566
# The redis cache.
567567
redis:
@@ -643,7 +643,8 @@ services:
643643
volumes:
644644
- ./volumes/plugin_daemon:/app/storage
645645
depends_on:
646-
- db
646+
db:
647+
condition: service_healthy
647648

648649
# ssrf_proxy server
649650
# for more information, please refer to

0 commit comments

Comments
 (0)