From 71ca6b1b8e9b8db27693ad6af75624f3695a7a2a Mon Sep 17 00:00:00 2001 From: Matthew Franglen Date: Fri, 22 Jan 2016 22:08:08 +0000 Subject: [PATCH 1/2] Issue #105: Update include_if_exists entry in configuration This allows the default settings file to be supplemented with additional settings. It is possible to replace all settings in this way, so a complete configuration file can be used. This needs to be tested. --- 9.3/docker-entrypoint.sh | 1 + 9.4/docker-entrypoint.sh | 1 + 9.5/docker-entrypoint.sh | 1 + 3 files changed, 3 insertions(+) diff --git a/9.3/docker-entrypoint.sh b/9.3/docker-entrypoint.sh index 95ec772380..c1697741c0 100755 --- a/9.3/docker-entrypoint.sh +++ b/9.3/docker-entrypoint.sh @@ -17,6 +17,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 + sed -i "s|^#include_if_exists = 'exists.conf'|include_if_exists = '/etc/postgres/postgresql.conf'|" "$PGDATA/postgresql.conf" # check password first so we can output the warning before postgres # messes it up diff --git a/9.4/docker-entrypoint.sh b/9.4/docker-entrypoint.sh index 95ec772380..c1697741c0 100755 --- a/9.4/docker-entrypoint.sh +++ b/9.4/docker-entrypoint.sh @@ -17,6 +17,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 + sed -i "s|^#include_if_exists = 'exists.conf'|include_if_exists = '/etc/postgres/postgresql.conf'|" "$PGDATA/postgresql.conf" # check password first so we can output the warning before postgres # messes it up diff --git a/9.5/docker-entrypoint.sh b/9.5/docker-entrypoint.sh index 95ec772380..c1697741c0 100755 --- a/9.5/docker-entrypoint.sh +++ b/9.5/docker-entrypoint.sh @@ -17,6 +17,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 + sed -i "s|^#include_if_exists = 'exists.conf'|include_if_exists = '/etc/postgres/postgresql.conf'|" "$PGDATA/postgresql.conf" # check password first so we can output the warning before postgres # messes it up From 67f95e631b913d7db0227e0e87d1040e1ed6dbba Mon Sep 17 00:00:00 2001 From: Matthew Franglen Date: Fri, 22 Jan 2016 22:14:27 +0000 Subject: [PATCH 2/2] Issue #105: Add include_if_exists entry in configuration This allows the default settings file to be supplemented with additional settings. It is possible to replace all settings in this way, so a complete configuration file can be used. This needs to be tested. --- 9.2/docker-entrypoint.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/9.2/docker-entrypoint.sh b/9.2/docker-entrypoint.sh index 95ec772380..f1bbf45c6b 100755 --- a/9.2/docker-entrypoint.sh +++ b/9.2/docker-entrypoint.sh @@ -17,6 +17,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 + { echo; echo "include_if_exists = '/etc/postgres/postgresql.conf'"; } >> "$PGDATA/postgresql.conf" # check password first so we can output the warning before postgres # messes it up