Skip to content

Add POSTGRES_INITDB_ARGS env var #132

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 15, 2016
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 9.1/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ if [ "$1" = 'postgres' ]; then

# look specifically for PG_VERSION, as it is expected in the DB dir
if [ ! -s "$PGDATA/PG_VERSION" ]; then
gosu postgres initdb
gosu postgres initdb "$POSTGRES_INITDB_ARGS"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this will cause trouble if we need multiple arguments (ie, something like POSTGRES_INITDB_ARGS='--a --b --c --d="e f").

Something like this is probably what we'll have to do instead: (so we get quote parsing, etc as appropriate)

eval "gosu postgres initdb $POSTGRES_INITDB_ARGS"


# check password first so we can output the warning before postgres
# messes it up
Expand Down
2 changes: 1 addition & 1 deletion 9.2/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ if [ "$1" = 'postgres' ]; then

# look specifically for PG_VERSION, as it is expected in the DB dir
if [ ! -s "$PGDATA/PG_VERSION" ]; then
gosu postgres initdb
gosu postgres initdb "$POSTGRES_INITDB_ARGS"

# check password first so we can output the warning before postgres
# messes it up
Expand Down
2 changes: 1 addition & 1 deletion 9.3/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ if [ "$1" = 'postgres' ]; then

# look specifically for PG_VERSION, as it is expected in the DB dir
if [ ! -s "$PGDATA/PG_VERSION" ]; then
gosu postgres initdb
gosu postgres initdb "$POSTGRES_INITDB_ARGS"

# check password first so we can output the warning before postgres
# messes it up
Expand Down
2 changes: 1 addition & 1 deletion 9.4/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ if [ "$1" = 'postgres' ]; then

# look specifically for PG_VERSION, as it is expected in the DB dir
if [ ! -s "$PGDATA/PG_VERSION" ]; then
gosu postgres initdb
gosu postgres initdb "$POSTGRES_INITDB_ARGS"

# check password first so we can output the warning before postgres
# messes it up
Expand Down
2 changes: 1 addition & 1 deletion 9.5/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ if [ "$1" = 'postgres' ]; then

# look specifically for PG_VERSION, as it is expected in the DB dir
if [ ! -s "$PGDATA/PG_VERSION" ]; then
gosu postgres initdb
gosu postgres initdb "$POSTGRES_INITDB_ARGS"

# check password first so we can output the warning before postgres
# messes it up
Expand Down
2 changes: 1 addition & 1 deletion docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ if [ "$1" = 'postgres' ]; then

# look specifically for PG_VERSION, as it is expected in the DB dir
if [ ! -s "$PGDATA/PG_VERSION" ]; then
gosu postgres initdb
gosu postgres initdb "$POSTGRES_INITDB_ARGS"

# check password first so we can output the warning before postgres
# messes it up
Expand Down