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