mirror of
https://github.com/goharbor/harbor.git
synced 2025-02-18 04:41:26 +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
|
#!/bin/bash
|
||||||
set -eo pipefail
|
set -eo pipefail
|
||||||
|
|
||||||
h="$(hostname -i || echo '127.0.0.1')"
|
host="localhost"
|
||||||
host="${h%%[[:space:]]*}" #remove the trailing space
|
|
||||||
user="${POSTGRES_USER:-postgres}"
|
user="${POSTGRES_USER:-postgres}"
|
||||||
db="${POSTGRES_DB:-$POSTGRES_USER}"
|
db="${POSTGRES_DB:-$POSTGRES_USER}"
|
||||||
export PGPASSWORD="${POSTGRES_PASSWORD:-}"
|
export PGPASSWORD="${POSTGRES_PASSWORD:-}"
|
||||||
|
Loading…
Reference in New Issue
Block a user