You've already forked postgres
mirror of
https://github.com/docker-library/postgres.git
synced 2025-11-17 13:02:40 +03:00
Merge pull request #84 from appropriate/export-entrypoint-vars
Export POSTGRES_USER and POSTGRES_DB vars in entrypoint
This commit is contained in:
@@ -52,6 +52,7 @@ if [ "$1" = 'postgres' ]; then
|
|||||||
|
|
||||||
: ${POSTGRES_USER:=postgres}
|
: ${POSTGRES_USER:=postgres}
|
||||||
: ${POSTGRES_DB:=$POSTGRES_USER}
|
: ${POSTGRES_DB:=$POSTGRES_USER}
|
||||||
|
export POSTGRES_USER POSTGRES_DB
|
||||||
|
|
||||||
if [ "$POSTGRES_DB" != 'postgres' ]; then
|
if [ "$POSTGRES_DB" != 'postgres' ]; then
|
||||||
psql --username postgres <<-EOSQL
|
psql --username postgres <<-EOSQL
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ if [ "$1" = 'postgres' ]; then
|
|||||||
|
|
||||||
: ${POSTGRES_USER:=postgres}
|
: ${POSTGRES_USER:=postgres}
|
||||||
: ${POSTGRES_DB:=$POSTGRES_USER}
|
: ${POSTGRES_DB:=$POSTGRES_USER}
|
||||||
|
export POSTGRES_USER POSTGRES_DB
|
||||||
|
|
||||||
if [ "$POSTGRES_DB" != 'postgres' ]; then
|
if [ "$POSTGRES_DB" != 'postgres' ]; then
|
||||||
psql --username postgres <<-EOSQL
|
psql --username postgres <<-EOSQL
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ if [ "$1" = 'postgres' ]; then
|
|||||||
|
|
||||||
: ${POSTGRES_USER:=postgres}
|
: ${POSTGRES_USER:=postgres}
|
||||||
: ${POSTGRES_DB:=$POSTGRES_USER}
|
: ${POSTGRES_DB:=$POSTGRES_USER}
|
||||||
|
export POSTGRES_USER POSTGRES_DB
|
||||||
|
|
||||||
if [ "$POSTGRES_DB" != 'postgres' ]; then
|
if [ "$POSTGRES_DB" != 'postgres' ]; then
|
||||||
psql --username postgres <<-EOSQL
|
psql --username postgres <<-EOSQL
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ if [ "$1" = 'postgres' ]; then
|
|||||||
|
|
||||||
: ${POSTGRES_USER:=postgres}
|
: ${POSTGRES_USER:=postgres}
|
||||||
: ${POSTGRES_DB:=$POSTGRES_USER}
|
: ${POSTGRES_DB:=$POSTGRES_USER}
|
||||||
|
export POSTGRES_USER POSTGRES_DB
|
||||||
|
|
||||||
if [ "$POSTGRES_DB" != 'postgres' ]; then
|
if [ "$POSTGRES_DB" != 'postgres' ]; then
|
||||||
psql --username postgres <<-EOSQL
|
psql --username postgres <<-EOSQL
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ if [ "$1" = 'postgres' ]; then
|
|||||||
|
|
||||||
: ${POSTGRES_USER:=postgres}
|
: ${POSTGRES_USER:=postgres}
|
||||||
: ${POSTGRES_DB:=$POSTGRES_USER}
|
: ${POSTGRES_DB:=$POSTGRES_USER}
|
||||||
|
export POSTGRES_USER POSTGRES_DB
|
||||||
|
|
||||||
if [ "$POSTGRES_DB" != 'postgres' ]; then
|
if [ "$POSTGRES_DB" != 'postgres' ]; then
|
||||||
psql --username postgres <<-EOSQL
|
psql --username postgres <<-EOSQL
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ if [ "$1" = 'postgres' ]; then
|
|||||||
|
|
||||||
: ${POSTGRES_USER:=postgres}
|
: ${POSTGRES_USER:=postgres}
|
||||||
: ${POSTGRES_DB:=$POSTGRES_USER}
|
: ${POSTGRES_DB:=$POSTGRES_USER}
|
||||||
|
export POSTGRES_USER POSTGRES_DB
|
||||||
|
|
||||||
if [ "$POSTGRES_DB" != 'postgres' ]; then
|
if [ "$POSTGRES_DB" != 'postgres' ]; then
|
||||||
psql --username postgres <<-EOSQL
|
psql --username postgres <<-EOSQL
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ if [ "$1" = 'postgres' ]; then
|
|||||||
|
|
||||||
: ${POSTGRES_USER:=postgres}
|
: ${POSTGRES_USER:=postgres}
|
||||||
: ${POSTGRES_DB:=$POSTGRES_USER}
|
: ${POSTGRES_DB:=$POSTGRES_USER}
|
||||||
|
export POSTGRES_USER POSTGRES_DB
|
||||||
|
|
||||||
if [ "$POSTGRES_DB" != 'postgres' ]; then
|
if [ "$POSTGRES_DB" != 'postgres' ]; then
|
||||||
psql --username postgres <<-EOSQL
|
psql --username postgres <<-EOSQL
|
||||||
|
|||||||
Reference in New Issue
Block a user