Pull the style out of the build. And, use the latest from zverik/regional

This commit is contained in:
galewis2 2022-01-24 14:00:34 -05:00 committed by GitHub
parent 9df02dc253
commit d2f592e824
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -74,28 +74,11 @@ RUN cd ~ \
########################################################################################################### ###########################################################################################################
FROM compiler-common AS compiler-stylesheet
ARG STYLE_REPO="https://github.com/gravitystorm/openstreetmap-carto.git"
ARG STYLE_BRANCH="v5.3.1"
RUN apt-get install -y --no-install-recommends \
npm
RUN cd ~ \
&& git clone --single-branch --branch ${STYLE_BRANCH} ${STYLE_REPO} --depth 1 \
&& cd openstreetmap-carto \
&& sed -ie 's#https:\/\/naciscdn.org\/naturalearth\/110m\/cultural\/ne_110m_admin_0_boundary_lines_land.zip#https:\/\/naturalearth.s3.amazonaws.com\/110m_cultural\/ne_110m_admin_0_boundary_lines_land.zip#g' external-data.yml \
&& npm install -g carto@0.18.2 \
&& carto project.mml > mapnik.xml
###########################################################################################################
FROM compiler-common AS compiler-helper-script FROM compiler-common AS compiler-helper-script
RUN mkdir -p /home/renderer/src \ RUN mkdir -p /home/renderer/src \
&& cd /home/renderer/src \ && cd /home/renderer/src \
&& git clone https://github.com/zverik/regional \ && git clone https://github.com/zverik/regional \
&& cd regional \ && cd regional \
&& git checkout 889d630a1e1a1bacabdd1dad6e17b49e7d58cd4b \
&& rm -rf .git \ && rm -rf .git \
&& chmod u+x /home/renderer/src/regional/trim_osc.py && chmod u+x /home/renderer/src/regional/trim_osc.py
@ -119,9 +102,11 @@ RUN apt-get update \
fonts-noto-hinted \ fonts-noto-hinted \
fonts-noto-unhinted \ fonts-noto-unhinted \
gdal-bin \ gdal-bin \
git-core \
liblua5.3-dev \ liblua5.3-dev \
lua5.3 \ lua5.3 \
mapnik-utils \ mapnik-utils \
npm \
osmium-tool \ osmium-tool \
osmosis \ osmosis \
postgresql-12 \ postgresql-12 \
@ -144,6 +129,9 @@ RUN adduser --disabled-password --gecos "" renderer
RUN pip3 install \ RUN pip3 install \
requests \ requests \
pyyaml pyyaml
# Install carto for stylesheet
RUN npm install -g carto@0.18.2
# Configure Apache # Configure Apache
RUN mkdir /var/lib/mod_tile \ RUN mkdir /var/lib/mod_tile \