You've already forked postgres
mirror of
https://github.com/docker-library/postgres.git
synced 2025-07-29 21:41:20 +03:00
Export POSTGRES_USER and POSTGRES_DB vars in entrypoint
Allows them to be used from /docker-entrypoint-initdb.d/*.sh scripts
This commit is contained in:
@ -52,6 +52,7 @@ if [ "$1" = 'postgres' ]; then
|
||||
|
||||
: ${POSTGRES_USER:=postgres}
|
||||
: ${POSTGRES_DB:=$POSTGRES_USER}
|
||||
export POSTGRES_USER POSTGRES_DB
|
||||
|
||||
if [ "$POSTGRES_DB" != 'postgres' ]; then
|
||||
psql --username postgres <<-EOSQL
|
||||
|
Reference in New Issue
Block a user