From ab0f62d08d3675d413a23fa1ea133221b9d91204 Mon Sep 17 00:00:00 2001 From: Grzegorz Adam Kowalski Date: Fri, 15 Mar 2019 19:20:59 +0100 Subject: [PATCH] Custom PostgreSQL conf with minimal settings --- Dockerfile | 5 ++++- postgresql.custom.conf | 8 ++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 postgresql.custom.conf diff --git a/Dockerfile b/Dockerfile index d0c18ca..9d020e6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -134,7 +134,10 @@ RUN ln -sf /proc/1/fd/1 /var/log/apache2/access.log \ && ln -sf /proc/1/fd/2 /var/log/apache2/error.log # Configure PosgtreSQL -RUN chown -R postgres:postgres /var/lib/postgresql +COPY postgresql.custom.conf /etc/postgresql/10/main/ +RUN chown -R postgres:postgres /var/lib/postgresql \ + && chown postgres:postgres /etc/postgresql/10/main/postgresql.custom.conf \ + && echo "\ninclude 'postgresql.custom.conf'" >> /etc/postgresql/10/main/postgresql.conf # Start running COPY run.sh / diff --git a/postgresql.custom.conf b/postgresql.custom.conf new file mode 100644 index 0000000..8bf2399 --- /dev/null +++ b/postgresql.custom.conf @@ -0,0 +1,8 @@ +# Suggested minimal settings from +# https://ircama.github.io/osm-carto-tutorials/tile-server-ubuntu/ + +shared_buffers = 128MB +min_wal_size = 1GB +max_wal_size = 2GB +work_mem = 32MB +maintenance_work_mem = 256MB