diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 28f8354f70..74a4e356fc 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -29,7 +29,8 @@ if [ "$1" = 'postgres' ]; then fi : ${POSTGRES_USER:=postgres} - if [ "$POSTGRES_USER" = 'postgres' ]; then + : ${POSTGRES_DB:=$POSTGRES_USER} + if [ "$POSTGRES_DB" = 'postgres' ]; then op='ALTER' else op='CREATE'