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

Add support for /docker-entrypoint-initdb.d/

This commit is contained in:
Mike Dillon
2014-10-08 20:55:25 -07:00
parent 94aee2022d
commit 4603177ae3
7 changed files with 42 additions and 0 deletions

View File

@ -10,6 +10,12 @@ if [ "$1" = 'postgres' ]; then
sed -ri "s/^#(listen_addresses\s*=\s*)\S+/\1'*'/" "$PGDATA"/postgresql.conf
{ echo; echo 'host all all 0.0.0.0/0 trust'; } >> "$PGDATA"/pg_hba.conf
if [ -d /docker-entrypoint-initdb.d ]; then
for f in /docker-entrypoint-initdb.d/*.sh; do
[ -f "$f" ] && . "$f"
done
fi
fi
exec gosu postgres "$@"