Skip to content

Commit

Permalink
Merge pull request #23 from md5/docker-entrypoint-initdb.d
Browse files Browse the repository at this point in the history
Add support for /docker-entrypoint-initdb.d/
  • Loading branch information
tianon committed Oct 9, 2014
2 parents 94aee20 + 4603177 commit f3def1e
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 0 deletions.
6 changes: 6 additions & 0 deletions 8.4/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 "$@"
Expand Down
6 changes: 6 additions & 0 deletions 9.0/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 "$@"
Expand Down
6 changes: 6 additions & 0 deletions 9.1/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 "$@"
Expand Down
6 changes: 6 additions & 0 deletions 9.2/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 "$@"
Expand Down
6 changes: 6 additions & 0 deletions 9.3/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 "$@"
Expand Down
6 changes: 6 additions & 0 deletions 9.4/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 "$@"
Expand Down
6 changes: 6 additions & 0 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 "$@"
Expand Down

0 comments on commit f3def1e

Please sign in to comment.