mirror of
https://github.com/tiennm99/goclaw.git
synced 2026-10-11 03:13:24 +00:00
fix: add database name to postgres healthcheck (#203)
When POSTGRES_USER differs from POSTGRES_DB, pg_isready defaults to connecting to a database named after the user, causing healthcheck to fail with "database does not exist".
This commit is contained in:
1 parent
dc51018563
commit
74c9fdd66b
1 file changed
+1
-1
@@ -19,7 +19,7 @@ services:
|
||||
volumes:
|
||||
- postgres-data:/var/lib/postgresql
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-goclaw}"]
|
||||
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-goclaw} -d ${POSTGRES_DB:-goclaw}"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
|
||||
Reference in new issue
Block a user