Skip to content

Commit 2d292b0

Browse files
committed
Fix postgres error FATAL: role "root" does not exist
Related Github issue: peter-evans/docker-compose-healthcheck#17 (comment)
1 parent dd76187 commit 2d292b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docker-compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ services:
1313
environment:
1414
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
1515
healthcheck:
16-
test: ["CMD-SHELL", "pg_isready"]
16+
test: ["CMD-SHELL", "pg_isready -d ${POSTGRES_DBNAME} -U postgres"]
1717
interval: 5s
1818
timeout: 5s
1919
retries: 10

0 commit comments

Comments
 (0)