From 789ff772bea1a52584e289c2d1d2930391be263e Mon Sep 17 00:00:00 2001 From: Alexander Overvoorde Date: Thu, 5 Dec 2019 21:27:46 +0100 Subject: [PATCH] Change custom config to be overridable --- Dockerfile | 3 +-- run.sh | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index a7247dba..a2b0f561 100644 --- a/Dockerfile +++ b/Dockerfile @@ -153,8 +153,7 @@ RUN ln -sf /dev/stdout /var/log/apache2/access.log \ # Configure PosgtreSQL COPY postgresql.custom.conf.tmpl /etc/postgresql/12/main/ RUN chown -R postgres:postgres /var/lib/postgresql \ - && chown postgres:postgres /etc/postgresql/12/main/postgresql.custom.conf.tmpl \ - && echo "\ninclude 'postgresql.custom.conf'" >> /etc/postgresql/12/main/postgresql.conf + && chown postgres:postgres /etc/postgresql/12/main/postgresql.custom.conf.tmpl RUN echo "host all all 0.0.0.0/0 md5" >> /etc/postgresql/12/main/pg_hba.conf \ && echo "host all all ::/0 md5" >> /etc/postgresql/12/main/pg_hba.conf diff --git a/run.sh b/run.sh index 481aac71..37b6bbdf 100755 --- a/run.sh +++ b/run.sh @@ -3,9 +3,9 @@ set -x function createPostgresConfig() { - cp /etc/postgresql/12/main/postgresql.custom.conf.tmpl /etc/postgresql/12/main/postgresql.custom.conf - sudo -u postgres echo "autovacuum = $AUTOVACUUM" >> /etc/postgresql/12/main/postgresql.custom.conf - cat /etc/postgresql/12/main/postgresql.custom.conf + cp /etc/postgresql/12/main/postgresql.custom.conf.tmpl /etc/postgresql/12/main/conf.d/postgresql.custom.conf + sudo -u postgres echo "autovacuum = $AUTOVACUUM" >> /etc/postgresql/12/main/conf.d/postgresql.custom.conf + cat /etc/postgresql/12/main/conf.d/postgresql.custom.conf } function setPostgresPassword() {