From 541f5ebb61c7fac38f420104c76b7aec86091e98 Mon Sep 17 00:00:00 2001 From: Steve Mason Date: Mon, 24 Jul 2017 09:58:56 +0100 Subject: [PATCH] Allow args to be passed to Postgres during init ..sometimes it's desirable to pass additional arguments to Postgres when it's started for the init scripts This change allows those to be given by setting a POSTGRES_INIT_ARGS environment variable --- docker-entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 5325dce177..9eb639cea1 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -95,7 +95,7 @@ if [ "$1" = 'postgres' ]; then # does not listen on external TCP/IP and waits until start finishes PGUSER="${PGUSER:-postgres}" \ pg_ctl -D "$PGDATA" \ - -o "-c listen_addresses='localhost'" \ + -o "-c listen_addresses='localhost' $POSTGRES_INIT_ARGS" \ -w start file_env 'POSTGRES_USER' 'postgres'