Skip to content

Commit 789ff77

Browse files
committed
Change custom config to be overridable
1 parent 64c66a7 commit 789ff77

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,7 @@ RUN ln -sf /dev/stdout /var/log/apache2/access.log \
153153
# Configure PosgtreSQL
154154
COPY postgresql.custom.conf.tmpl /etc/postgresql/12/main/
155155
RUN chown -R postgres:postgres /var/lib/postgresql \
156-
&& chown postgres:postgres /etc/postgresql/12/main/postgresql.custom.conf.tmpl \
157-
&& echo "\ninclude 'postgresql.custom.conf'" >> /etc/postgresql/12/main/postgresql.conf
156+
&& chown postgres:postgres /etc/postgresql/12/main/postgresql.custom.conf.tmpl
158157
RUN echo "host all all 0.0.0.0/0 md5" >> /etc/postgresql/12/main/pg_hba.conf \
159158
&& echo "host all all ::/0 md5" >> /etc/postgresql/12/main/pg_hba.conf
160159

run.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
set -x
44

55
function createPostgresConfig() {
6-
cp /etc/postgresql/12/main/postgresql.custom.conf.tmpl /etc/postgresql/12/main/postgresql.custom.conf
7-
sudo -u postgres echo "autovacuum = $AUTOVACUUM" >> /etc/postgresql/12/main/postgresql.custom.conf
8-
cat /etc/postgresql/12/main/postgresql.custom.conf
6+
cp /etc/postgresql/12/main/postgresql.custom.conf.tmpl /etc/postgresql/12/main/conf.d/postgresql.custom.conf
7+
sudo -u postgres echo "autovacuum = $AUTOVACUUM" >> /etc/postgresql/12/main/conf.d/postgresql.custom.conf
8+
cat /etc/postgresql/12/main/conf.d/postgresql.custom.conf
99
}
1010

1111
function setPostgresPassword() {

0 commit comments

Comments
 (0)