Carto 5.3.1 integrated (#183)

This commit is contained in:
ruhepuls 2021-05-13 14:41:01 +02:00 committed by GitHub
parent 75e7714f20
commit 8f2c575ad6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 4 deletions

View File

@ -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 \

4
run.sh
View File

@ -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