1
0
mirror of https://github.com/docker-library/postgres.git synced 2025-07-28 10:42:06 +03:00

Run /docker-entrypoint-initdb.d/*.sql scripts as $POSTGRES_USER

This commit is contained in:
Mike Dillon
2015-08-21 22:57:17 -07:00
committed by Mike Dillon
parent 2273ec160e
commit c444bceb4f
7 changed files with 7 additions and 7 deletions

View File

@ -75,7 +75,7 @@ if [ "$1" = 'postgres' ]; then
for f in /docker-entrypoint-initdb.d/*; do
case "$f" in
*.sh) echo "$0: running $f"; . "$f" ;;
*.sql) echo "$0: running $f"; psql --username postgres --dbname "$POSTGRES_DB" < "$f" && echo ;;
*.sql) echo "$0: running $f"; psql --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" < "$f" && echo ;;
*) echo "$0: ignoring $f" ;;
esac
echo