Merge pull request #14682 from ninjadq/hostname_hardcode_to_localhost

Fix: Use local host on db's healthcheck
This commit is contained in:
Wenkai Yin(尹文开) 2021-04-19 21:02:31 +08:00 committed by GitHub
commit 0f6692f68f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,8 +1,7 @@
#!/bin/bash
set -eo pipefail
h="$(hostname -i || echo '127.0.0.1')"
host="${h%%[[:space:]]*}" #remove the trailing space
host="localhost"
user="${POSTGRES_USER:-postgres}"
db="${POSTGRES_DB:-$POSTGRES_USER}"
export PGPASSWORD="${POSTGRES_PASSWORD:-}"