Skip to content

Commit 87b8be7

Browse files
committed
Merge pull request #84 from appropriate/export-entrypoint-vars
Export POSTGRES_USER and POSTGRES_DB vars in entrypoint
2 parents 118e25a + cd294bf commit 87b8be7

7 files changed

+7
-0
lines changed

9.0/docker-entrypoint.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ if [ "$1" = 'postgres' ]; then
5252

5353
: ${POSTGRES_USER:=postgres}
5454
: ${POSTGRES_DB:=$POSTGRES_USER}
55+
export POSTGRES_USER POSTGRES_DB
5556

5657
if [ "$POSTGRES_DB" != 'postgres' ]; then
5758
psql --username postgres <<-EOSQL

9.1/docker-entrypoint.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ if [ "$1" = 'postgres' ]; then
5252

5353
: ${POSTGRES_USER:=postgres}
5454
: ${POSTGRES_DB:=$POSTGRES_USER}
55+
export POSTGRES_USER POSTGRES_DB
5556

5657
if [ "$POSTGRES_DB" != 'postgres' ]; then
5758
psql --username postgres <<-EOSQL

9.2/docker-entrypoint.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ if [ "$1" = 'postgres' ]; then
5252

5353
: ${POSTGRES_USER:=postgres}
5454
: ${POSTGRES_DB:=$POSTGRES_USER}
55+
export POSTGRES_USER POSTGRES_DB
5556

5657
if [ "$POSTGRES_DB" != 'postgres' ]; then
5758
psql --username postgres <<-EOSQL

9.3/docker-entrypoint.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ if [ "$1" = 'postgres' ]; then
5252

5353
: ${POSTGRES_USER:=postgres}
5454
: ${POSTGRES_DB:=$POSTGRES_USER}
55+
export POSTGRES_USER POSTGRES_DB
5556

5657
if [ "$POSTGRES_DB" != 'postgres' ]; then
5758
psql --username postgres <<-EOSQL

9.4/docker-entrypoint.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ if [ "$1" = 'postgres' ]; then
5252

5353
: ${POSTGRES_USER:=postgres}
5454
: ${POSTGRES_DB:=$POSTGRES_USER}
55+
export POSTGRES_USER POSTGRES_DB
5556

5657
if [ "$POSTGRES_DB" != 'postgres' ]; then
5758
psql --username postgres <<-EOSQL

9.5/docker-entrypoint.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ if [ "$1" = 'postgres' ]; then
5252

5353
: ${POSTGRES_USER:=postgres}
5454
: ${POSTGRES_DB:=$POSTGRES_USER}
55+
export POSTGRES_USER POSTGRES_DB
5556

5657
if [ "$POSTGRES_DB" != 'postgres' ]; then
5758
psql --username postgres <<-EOSQL

docker-entrypoint.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ if [ "$1" = 'postgres' ]; then
5252

5353
: ${POSTGRES_USER:=postgres}
5454
: ${POSTGRES_DB:=$POSTGRES_USER}
55+
export POSTGRES_USER POSTGRES_DB
5556

5657
if [ "$POSTGRES_DB" != 'postgres' ]; then
5758
psql --username postgres <<-EOSQL

0 commit comments

Comments
 (0)