Skip to content

Commit

Permalink
Fixed the pgpass creation for hostname
Browse files Browse the repository at this point in the history
  • Loading branch information
alackmann authored Feb 3, 2017
1 parent dba7fed commit 6436701
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

POSTGRES_USER=${POSTGRES_USER:-${DB_ENV_POSTGRES_USER}}
POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-${DB_ENV_POSTGRES_PASSWORD}}
POSTGRES_HOST=${POSTGRES_HOST:-${DB_ENV_POSTGRES_HOST}}

echo "db:*:*:"${POSTGRES_USER}":"${POSTGRES_PASSWORD} > ~/.pgpass
echo "${POSTGRES_HOST}:*:*:"${POSTGRES_USER}":"${POSTGRES_PASSWORD} > ~/.pgpass
chmod 0600 ~/.pgpass

"$@" -U ${POSTGRES_USER} -h ${POSTGRES_HOST:-db}

0 comments on commit 6436701

Please sign in to comment.