mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-26 02:28:06 +01:00
Fix: Use local host on db's healthcheck
hostname -i will malfunction in some cases like the `nsswitch.conf` file does'nt exist Signed-off-by: DQ <dengq@vmware.com>
This commit is contained in:
parent
fb50b1313e
commit
ffed6459c7
@ -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:-}"
|
||||
|
Loading…
Reference in New Issue
Block a user