Merge branch 'master' into stevo-autovacuum

master
Alexander Overvoorde 2019-04-23 21:37:06 +02:00 committed by GitHub
commit 095c3badc3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 5 deletions

View File

@ -11,6 +11,7 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# Install dependencies
RUN echo "deb [ allow-insecure=yes ] http://apt.postgresql.org/pub/repos/apt/ bionic-pgdg main" >> /etc/apt/sources.list.d/pgdg.list \
&& apt-get update \
&& apt-get install -y apt-transport-https ca-certificates \
&& apt-get install -y --no-install-recommends --allow-unauthenticated \
apache2 \
apache2-dev \
@ -70,8 +71,6 @@ RUN echo "deb [ allow-insecure=yes ] http://apt.postgresql.org/pub/repos/apt/ bi
RUN adduser --disabled-password --gecos "" renderer
USER renderer
ENV GIT_SSL_NO_VERIFY=true
# Install latest osm2pgsql
RUN mkdir /home/renderer/src
WORKDIR /home/renderer/src
@ -106,14 +105,12 @@ WORKDIR /home/renderer/src
RUN git clone https://github.com/gravitystorm/openstreetmap-carto.git
WORKDIR /home/renderer/src/openstreetmap-carto
USER root
RUN npm config set strict-ssl=false \
&& npm install -g carto
RUN npm install -g carto
USER renderer
RUN carto project.mml > mapnik.xml
# Load shapefiles
WORKDIR /home/renderer/src/openstreetmap-carto
ENV PYTHONHTTPSVERIFY=0
RUN scripts/get-shapefiles.py
# Configure renderd

View File

@ -43,6 +43,21 @@ The database use the autovacuum feature by default. This behavior can be changed
docker run -p 80:80 -e AUTOVACUUM=off -v openstreetmap-data:/var/lib/postgresql/10/main -d overv/openstreetmap-tile-server
## Troubleshooting
### ERROR: could not resize shared memory segment
If you encounter such entries in the log, it will mean that the default shared memory limit (64 MB) is too low for the container and it should be raised:
renderd[126]: ERROR: failed to render TILE ajt 6 32-39 16-23,
renderd[126]: reason: Postgis Plugin: ERROR: could not resize shared memory segment
To raise it use `--shm-size` parameter. For example:
docker run -p 80:80 -v openstreetmap-data:/var/lib/postgresql/10/main --shm-size="192m" -d overv/openstreetmap-tile-server run
For too high values you may notice excessive CPU load and memory usage. It might be that you will have to experimentally find the best values for yourself.
## License
```