Cleanup indenting
This commit is contained in:
parent
eb3d1c42b6
commit
3d5ff58f1f
192
Dockerfile
192
Dockerfile
@ -14,83 +14,83 @@ RUN apt-get update \
|
|||||||
&& apt-get install -y --no-install-recommends \
|
&& apt-get install -y --no-install-recommends \
|
||||||
postgresql-server-dev-12
|
postgresql-server-dev-12
|
||||||
RUN wget https://download.osgeo.org/postgis/source/postgis-3.1.1.tar.gz -O postgis.tar.gz \
|
RUN wget https://download.osgeo.org/postgis/source/postgis-3.1.1.tar.gz -O postgis.tar.gz \
|
||||||
&& mkdir -p postgis_src \
|
&& mkdir -p postgis_src \
|
||||||
&& tar -xvzf postgis.tar.gz --strip 1 -C postgis_src \
|
&& tar -xvzf postgis.tar.gz --strip 1 -C postgis_src \
|
||||||
&& rm postgis.tar.gz \
|
&& rm postgis.tar.gz \
|
||||||
&& cd postgis_src \
|
&& cd postgis_src \
|
||||||
&& ./configure --without-protobuf \
|
&& ./configure --without-protobuf \
|
||||||
&& make -j $(nproc) \
|
&& make -j $(nproc) \
|
||||||
&& checkinstall --pkgversion="3.1.1" --install=no --default make install
|
&& checkinstall --pkgversion="3.1.1" --install=no --default make install
|
||||||
|
|
||||||
###########################################################################################################
|
###########################################################################################################
|
||||||
|
|
||||||
FROM compiler-common AS compiler-osm2pgsql
|
FROM compiler-common AS compiler-osm2pgsql
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y --no-install-recommends \
|
&& apt-get install -y --no-install-recommends \
|
||||||
cmake \
|
cmake \
|
||||||
g++ \
|
g++ \
|
||||||
libboost-dev \
|
libboost-dev \
|
||||||
libboost-system-dev \
|
libboost-system-dev \
|
||||||
libboost-filesystem-dev \
|
libboost-filesystem-dev \
|
||||||
libexpat1-dev \
|
libexpat1-dev \
|
||||||
zlib1g-dev \
|
zlib1g-dev \
|
||||||
libbz2-dev \
|
libbz2-dev \
|
||||||
libpq-dev \
|
libpq-dev \
|
||||||
libproj-dev \
|
libproj-dev \
|
||||||
lua5.3 \
|
lua5.3 \
|
||||||
liblua5.3-dev \
|
liblua5.3-dev \
|
||||||
pandoc
|
pandoc
|
||||||
RUN cd ~ \
|
RUN cd ~ \
|
||||||
&& git clone -b master --single-branch https://github.com/openstreetmap/osm2pgsql.git --depth 1 \
|
&& git clone -b master --single-branch https://github.com/openstreetmap/osm2pgsql.git --depth 1 \
|
||||||
&& cd osm2pgsql \
|
&& cd osm2pgsql \
|
||||||
&& mkdir build \
|
&& mkdir build \
|
||||||
&& cd build \
|
&& cd build \
|
||||||
&& cmake .. \
|
&& cmake .. \
|
||||||
&& make -j $(nproc) \
|
&& make -j $(nproc) \
|
||||||
&& checkinstall --pkgversion="1" --install=no --default make install
|
&& checkinstall --pkgversion="1" --install=no --default make install
|
||||||
|
|
||||||
###########################################################################################################
|
###########################################################################################################
|
||||||
|
|
||||||
FROM compiler-common AS compiler-modtile-renderd
|
FROM compiler-common AS compiler-modtile-renderd
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y --no-install-recommends \
|
&& apt-get install -y --no-install-recommends \
|
||||||
apache2-dev \
|
apache2-dev \
|
||||||
automake \
|
automake \
|
||||||
autoconf \
|
autoconf \
|
||||||
autotools-dev \
|
autotools-dev \
|
||||||
libtool \
|
libtool \
|
||||||
libmapnik-dev
|
libmapnik-dev
|
||||||
RUN cd ~ \
|
RUN cd ~ \
|
||||||
&& git clone -b switch2osm --single-branch https://github.com/SomeoneElseOSM/mod_tile.git --depth 1 \
|
&& git clone -b switch2osm --single-branch https://github.com/SomeoneElseOSM/mod_tile.git --depth 1 \
|
||||||
&& cd mod_tile \
|
&& cd mod_tile \
|
||||||
&& ./autogen.sh \
|
&& ./autogen.sh \
|
||||||
&& ./configure \
|
&& ./configure \
|
||||||
&& make -j $(nproc) \
|
&& make -j $(nproc) \
|
||||||
&& checkinstall --pkgversion="1" --install=no --pkgname "renderd" --default make install \
|
&& checkinstall --pkgversion="1" --install=no --pkgname "renderd" --default make install \
|
||||||
&& checkinstall --pkgversion="1" --install=no --pkgname "mod_tile" --default make install-mod_tile
|
&& checkinstall --pkgversion="1" --install=no --pkgname "mod_tile" --default make install-mod_tile
|
||||||
|
|
||||||
###########################################################################################################
|
###########################################################################################################
|
||||||
|
|
||||||
FROM compiler-common AS compiler-stylesheet
|
FROM compiler-common AS compiler-stylesheet
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y --no-install-recommends \
|
&& apt-get install -y --no-install-recommends \
|
||||||
npm
|
npm
|
||||||
RUN cd ~ \
|
RUN cd ~ \
|
||||||
&& git clone --single-branch --branch v5.3.1 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 \
|
&& 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 \
|
&& 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 \
|
&& npm install -g carto@0.18.2 \
|
||||||
&& carto project.mml > mapnik.xml
|
&& carto project.mml > mapnik.xml
|
||||||
|
|
||||||
###########################################################################################################
|
###########################################################################################################
|
||||||
|
|
||||||
FROM compiler-common AS compiler-helper-script
|
FROM compiler-common AS compiler-helper-script
|
||||||
RUN cd /home/renderer/src \
|
RUN 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 \
|
&& 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
|
||||||
|
|
||||||
###########################################################################################################
|
###########################################################################################################
|
||||||
|
|
||||||
@ -106,28 +106,28 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
|||||||
# Get packages
|
# Get packages
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y --no-install-recommends \
|
&& apt-get install -y --no-install-recommends \
|
||||||
apache2 \
|
apache2 \
|
||||||
cron \
|
cron \
|
||||||
fonts-noto-cjk \
|
fonts-noto-cjk \
|
||||||
fonts-noto-hinted \
|
fonts-noto-hinted \
|
||||||
fonts-noto-unhinted \
|
fonts-noto-unhinted \
|
||||||
gdal-bin \
|
gdal-bin \
|
||||||
liblua5.3-dev \
|
liblua5.3-dev \
|
||||||
lua5.3 \
|
lua5.3 \
|
||||||
mapnik-utils \
|
mapnik-utils \
|
||||||
osmium-tool \
|
osmium-tool \
|
||||||
osmosis \
|
osmosis \
|
||||||
postgresql-12 \
|
postgresql-12 \
|
||||||
postgresql-contrib-12 \
|
postgresql-contrib-12 \
|
||||||
python-is-python3 \
|
python-is-python3 \
|
||||||
python3-mapnik \
|
python3-mapnik \
|
||||||
python3-lxml \
|
python3-lxml \
|
||||||
python3-psycopg2 \
|
python3-psycopg2 \
|
||||||
python3-shapely \
|
python3-shapely \
|
||||||
python3-pip \
|
python3-pip \
|
||||||
sudo \
|
sudo \
|
||||||
ttf-unifont \
|
ttf-unifont \
|
||||||
wget \
|
wget \
|
||||||
&& apt-get clean autoclean \
|
&& apt-get clean autoclean \
|
||||||
&& apt-get autoremove --yes \
|
&& apt-get autoremove --yes \
|
||||||
&& rm -rf /var/lib/{apt,dpkg,cache,log}/
|
&& rm -rf /var/lib/{apt,dpkg,cache,log}/
|
||||||
@ -142,34 +142,34 @@ RUN pip3 install \
|
|||||||
|
|
||||||
# Configure Apache
|
# Configure Apache
|
||||||
RUN mkdir /var/lib/mod_tile \
|
RUN mkdir /var/lib/mod_tile \
|
||||||
&& chown renderer /var/lib/mod_tile \
|
&& chown renderer /var/lib/mod_tile \
|
||||||
&& mkdir /var/run/renderd \
|
&& mkdir /var/run/renderd \
|
||||||
&& chown renderer /var/run/renderd \
|
&& chown renderer /var/run/renderd \
|
||||||
&& echo "LoadModule tile_module /usr/lib/apache2/modules/mod_tile.so" >> /etc/apache2/conf-available/mod_tile.conf \
|
&& echo "LoadModule tile_module /usr/lib/apache2/modules/mod_tile.so" >> /etc/apache2/conf-available/mod_tile.conf \
|
||||||
&& echo "LoadModule headers_module /usr/lib/apache2/modules/mod_headers.so" >> /etc/apache2/conf-available/mod_headers.conf \
|
&& echo "LoadModule headers_module /usr/lib/apache2/modules/mod_headers.so" >> /etc/apache2/conf-available/mod_headers.conf \
|
||||||
&& a2enconf mod_tile && a2enconf mod_headers
|
&& a2enconf mod_tile && a2enconf mod_headers
|
||||||
COPY apache.conf /etc/apache2/sites-available/000-default.conf
|
COPY apache.conf /etc/apache2/sites-available/000-default.conf
|
||||||
COPY leaflet-demo.html /var/www/html/index.html
|
COPY leaflet-demo.html /var/www/html/index.html
|
||||||
RUN ln -sf /dev/stdout /var/log/apache2/access.log \
|
RUN ln -sf /dev/stdout /var/log/apache2/access.log \
|
||||||
&& ln -sf /dev/stderr /var/log/apache2/error.log
|
&& ln -sf /dev/stderr /var/log/apache2/error.log
|
||||||
|
|
||||||
# Copy update scripts
|
# Copy update scripts
|
||||||
COPY openstreetmap-tiles-update-expire /usr/bin/
|
COPY openstreetmap-tiles-update-expire /usr/bin/
|
||||||
RUN chmod +x /usr/bin/openstreetmap-tiles-update-expire \
|
RUN chmod +x /usr/bin/openstreetmap-tiles-update-expire \
|
||||||
&& mkdir /var/log/tiles \
|
&& mkdir /var/log/tiles \
|
||||||
&& chmod a+rw /var/log/tiles \
|
&& chmod a+rw /var/log/tiles \
|
||||||
&& ln -s /home/renderer/src/mod_tile/osmosis-db_replag /usr/bin/osmosis-db_replag \
|
&& ln -s /home/renderer/src/mod_tile/osmosis-db_replag /usr/bin/osmosis-db_replag \
|
||||||
&& echo "* * * * * renderer openstreetmap-tiles-update-expire\n" >> /etc/crontab
|
&& echo "* * * * * renderer openstreetmap-tiles-update-expire\n" >> /etc/crontab
|
||||||
|
|
||||||
RUN mkdir /nodes \
|
RUN mkdir /nodes \
|
||||||
&& chown renderer:renderer /nodes
|
&& chown renderer:renderer /nodes
|
||||||
|
|
||||||
# Configure PosgtreSQL
|
# Configure PosgtreSQL
|
||||||
COPY postgresql.custom.conf.tmpl /etc/postgresql/12/main/
|
COPY postgresql.custom.conf.tmpl /etc/postgresql/12/main/
|
||||||
RUN chown -R postgres:postgres /var/lib/postgresql \
|
RUN chown -R postgres:postgres /var/lib/postgresql \
|
||||||
&& chown postgres:postgres /etc/postgresql/12/main/postgresql.custom.conf.tmpl \
|
&& chown postgres:postgres /etc/postgresql/12/main/postgresql.custom.conf.tmpl \
|
||||||
&& echo "host all all 0.0.0.0/0 md5" >> /etc/postgresql/12/main/pg_hba.conf \
|
&& echo "host all all 0.0.0.0/0 md5" >> /etc/postgresql/12/main/pg_hba.conf \
|
||||||
&& echo "host all all ::/0 md5" >> /etc/postgresql/12/main/pg_hba.conf
|
&& echo "host all all ::/0 md5" >> /etc/postgresql/12/main/pg_hba.conf
|
||||||
|
|
||||||
###########################################################################################################
|
###########################################################################################################
|
||||||
|
|
||||||
@ -178,26 +178,26 @@ FROM final-base AS final
|
|||||||
# Install PostGIS
|
# Install PostGIS
|
||||||
COPY --from=compiler-postgis postgis_src/postgis-src_3.1.1-1_amd64.deb .
|
COPY --from=compiler-postgis postgis_src/postgis-src_3.1.1-1_amd64.deb .
|
||||||
RUN dpkg -i postgis-src_3.1.1-1_amd64.deb \
|
RUN dpkg -i postgis-src_3.1.1-1_amd64.deb \
|
||||||
&& rm postgis-src_3.1.1-1_amd64.deb
|
&& rm postgis-src_3.1.1-1_amd64.deb
|
||||||
|
|
||||||
# Install osm2pgsql
|
# Install osm2pgsql
|
||||||
COPY --from=compiler-osm2pgsql /root/osm2pgsql/build/build_1-1_amd64.deb .
|
COPY --from=compiler-osm2pgsql /root/osm2pgsql/build/build_1-1_amd64.deb .
|
||||||
RUN dpkg -i build_1-1_amd64.deb \
|
RUN dpkg -i build_1-1_amd64.deb \
|
||||||
&& rm build_1-1_amd64.deb
|
&& rm build_1-1_amd64.deb
|
||||||
|
|
||||||
# Install renderd
|
# Install renderd
|
||||||
COPY --from=compiler-modtile-renderd /root/mod_tile/renderd_1-1_amd64.deb .
|
COPY --from=compiler-modtile-renderd /root/mod_tile/renderd_1-1_amd64.deb .
|
||||||
RUN dpkg -i renderd_1-1_amd64.deb \
|
RUN dpkg -i renderd_1-1_amd64.deb \
|
||||||
&& rm renderd_1-1_amd64.deb \
|
&& rm renderd_1-1_amd64.deb \
|
||||||
&& sed -i 's/renderaccount/renderer/g' /usr/local/etc/renderd.conf \
|
&& sed -i 's/renderaccount/renderer/g' /usr/local/etc/renderd.conf \
|
||||||
&& sed -i 's/\/truetype//g' /usr/local/etc/renderd.conf \
|
&& sed -i 's/\/truetype//g' /usr/local/etc/renderd.conf \
|
||||||
&& sed -i 's/hot/tile/g' /usr/local/etc/renderd.conf
|
&& sed -i 's/hot/tile/g' /usr/local/etc/renderd.conf
|
||||||
|
|
||||||
# Install mod_tile
|
# Install mod_tile
|
||||||
COPY --from=compiler-modtile-renderd /root/mod_tile/mod-tile_1-1_amd64.deb .
|
COPY --from=compiler-modtile-renderd /root/mod_tile/mod-tile_1-1_amd64.deb .
|
||||||
RUN dpkg -i mod-tile_1-1_amd64.deb \
|
RUN dpkg -i mod-tile_1-1_amd64.deb \
|
||||||
&& ldconfig \
|
&& ldconfig \
|
||||||
&& rm mod-tile_1-1_amd64.deb
|
&& rm mod-tile_1-1_amd64.deb
|
||||||
|
|
||||||
# Install stylesheet
|
# Install stylesheet
|
||||||
COPY --from=compiler-stylesheet /root/openstreetmap-carto /home/renderer/src/openstreetmap-carto
|
COPY --from=compiler-stylesheet /root/openstreetmap-carto /home/renderer/src/openstreetmap-carto
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user