You've already forked postgres
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:
@ -10,6 +10,12 @@ if [ "$1" = 'postgres' ]; then
|
|||||||
sed -ri "s/^#(listen_addresses\s*=\s*)\S+/\1'*'/" "$PGDATA"/postgresql.conf
|
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
|
{ 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
|
fi
|
||||||
|
|
||||||
exec gosu postgres "$@"
|
exec gosu postgres "$@"
|
||||||
|
@ -10,6 +10,12 @@ if [ "$1" = 'postgres' ]; then
|
|||||||
sed -ri "s/^#(listen_addresses\s*=\s*)\S+/\1'*'/" "$PGDATA"/postgresql.conf
|
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
|
{ 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
|
fi
|
||||||
|
|
||||||
exec gosu postgres "$@"
|
exec gosu postgres "$@"
|
||||||
|
@ -10,6 +10,12 @@ if [ "$1" = 'postgres' ]; then
|
|||||||
sed -ri "s/^#(listen_addresses\s*=\s*)\S+/\1'*'/" "$PGDATA"/postgresql.conf
|
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
|
{ 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
|
fi
|
||||||
|
|
||||||
exec gosu postgres "$@"
|
exec gosu postgres "$@"
|
||||||
|
@ -10,6 +10,12 @@ if [ "$1" = 'postgres' ]; then
|
|||||||
sed -ri "s/^#(listen_addresses\s*=\s*)\S+/\1'*'/" "$PGDATA"/postgresql.conf
|
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
|
{ 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
|
fi
|
||||||
|
|
||||||
exec gosu postgres "$@"
|
exec gosu postgres "$@"
|
||||||
|
@ -10,6 +10,12 @@ if [ "$1" = 'postgres' ]; then
|
|||||||
sed -ri "s/^#(listen_addresses\s*=\s*)\S+/\1'*'/" "$PGDATA"/postgresql.conf
|
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
|
{ 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
|
fi
|
||||||
|
|
||||||
exec gosu postgres "$@"
|
exec gosu postgres "$@"
|
||||||
|
@ -10,6 +10,12 @@ if [ "$1" = 'postgres' ]; then
|
|||||||
sed -ri "s/^#(listen_addresses\s*=\s*)\S+/\1'*'/" "$PGDATA"/postgresql.conf
|
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
|
{ 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
|
fi
|
||||||
|
|
||||||
exec gosu postgres "$@"
|
exec gosu postgres "$@"
|
||||||
|
@ -10,6 +10,12 @@ if [ "$1" = 'postgres' ]; then
|
|||||||
sed -ri "s/^#(listen_addresses\s*=\s*)\S+/\1'*'/" "$PGDATA"/postgresql.conf
|
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
|
{ 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
|
fi
|
||||||
|
|
||||||
exec gosu postgres "$@"
|
exec gosu postgres "$@"
|
||||||
|
Reference in New Issue
Block a user