Skip to content

Commit 6bbff06

Browse files
committed
Added postgis service's pg_isready healthcheck with external ip in docker-compose.yml
Signed-off-by: Ko Nagase <[email protected]>
1 parent c233dd5 commit 6bbff06

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

docker-compose.yml

+8-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ services:
99
POSTGRES_DB: ${DB_NAME}
1010
volumes:
1111
- postgis:/var/lib/postgresql/data
12+
healthcheck:
13+
test: "pg_isready -h postgis -U ${DB_USER} -d ${DB_NAME}"
14+
interval: 10s
15+
timeout: 2s
16+
retries: 5
17+
start_period: 10s
1218

1319
redmine:
1420
build:
@@ -22,7 +28,8 @@ services:
2228
- ./plugins:/usr/src/redmine/plugins
2329
- ./public/themes:/usr/src/redmine/public/themes
2430
depends_on:
25-
- postgis
31+
postgis:
32+
condition: service_healthy
2633

2734
volumes:
2835
postgis:

0 commit comments

Comments
 (0)