From 8f2c575ad60be2e4c084eb3ed28727733a61d9c0 Mon Sep 17 00:00:00 2001 From: ruhepuls <31071043+ruhepuls@users.noreply.github.com> Date: Thu, 13 May 2021 14:41:01 +0200 Subject: [PATCH] Carto 5.3.1 integrated (#183) --- Dockerfile | 11 +++++++---- run.sh | 4 ++++ 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0f2822a..5312789 100644 --- a/Dockerfile +++ b/Dockerfile @@ -66,6 +66,7 @@ RUN apt-get install -y --no-install-recommends \ python3-lxml \ python3-psycopg2 \ python3-shapely \ + python3-pip \ sudo \ tar \ ttf-unifont \ @@ -76,6 +77,10 @@ RUN apt-get install -y --no-install-recommends \ && apt-get autoremove --yes \ && rm -rf /var/lib/{apt,dpkg,cache,log}/ +# Install python libraries +RUN pip3 install requests \ + && pip3 install pyyaml + # Set up PostGIS RUN wget https://download.osgeo.org/postgis/source/postgis-3.1.1.tar.gz -O postgis.tar.gz \ && mkdir -p postgis_src \ @@ -122,13 +127,11 @@ RUN mkdir -p /home/renderer/src \ # Configure stylesheet RUN mkdir -p /home/renderer/src \ && cd /home/renderer/src \ - && git clone --single-branch --branch v5.2.0 https://github.com/gravitystorm/openstreetmap-carto.git --depth 1 \ + && git clone --single-branch --branch v5.3.1 https://github.com/gravitystorm/openstreetmap-carto.git --depth 1 \ && cd openstreetmap-carto \ && rm -rf .git \ && npm install -g carto@0.18.2 \ - && carto project.mml > mapnik.xml \ - && scripts/get-shapefiles.py \ - && rm /home/renderer/src/openstreetmap-carto/data/*.zip + && carto project.mml > mapnik.xml # Configure renderd RUN sed -i 's/renderaccount/renderer/g' /usr/local/etc/renderd.conf \ diff --git a/run.sh b/run.sh index 10d6b40..95e219e 100755 --- a/run.sh +++ b/run.sh @@ -77,6 +77,10 @@ if [ "$1" = "import" ]; then # Create indexes sudo -u postgres psql -d gis -f indexes.sql + + #Import external data + sudo chown -R renderer: /home/renderer/src + sudo -u renderer python3 /home/renderer/src/openstreetmap-carto/scripts/get-external-data.py -c /home/renderer/src/openstreetmap-carto/external-data.yml -D /home/renderer/src/openstreetmap-carto/data # Register that data has changed for mod_tile caching purposes touch /var/lib/mod_tile/planet-import-complete