Skip to content

Commit 05294fe

Browse files
committed
🐛(backend) add user/db to pg healthchecks
Adds PostgreSQL user and database names to the docker-compose.yaml healthchecks. This resolves an error that appears in the logs, where 'root' is used by default.
1 parent eb23aef commit 05294fe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ services:
44
postgresql:
55
image: postgres:16
66
healthcheck:
7-
test: ["CMD-SHELL", "pg_isready"]
7+
test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"]
88
interval: 1s
99
timeout: 2s
1010
retries: 300
@@ -194,7 +194,7 @@ services:
194194
kc_postgresql:
195195
image: postgres:14.3
196196
healthcheck:
197-
test: ["CMD-SHELL", "pg_isready"]
197+
test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"]
198198
interval: 1s
199199
timeout: 2s
200200
retries: 300

0 commit comments

Comments
 (0)