Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated to Debian 10, current styles and correction of resources. #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 45 additions & 45 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,90 +1,90 @@
FROM debian:8.4
MAINTAINER Philip Beelmann <[email protected]>
FROM debian:10-slim
LABEL maintainer="Philip Beelmann <[email protected]>"

RUN apt-get update && apt-get install -y \
gdal-bin \
node-carto \
libwww-perl \
apache2 \
libmapnik2.2 \
libmapnik3.0 \
mapnik-utils \
libjson-perl \
libipc-sharelite-perl \
libgd-gd2-perl \
libgd-perl \
fonts-noto-cjk \
fonts-noto-hinted \
fonts-noto-unhinted \
ttf-unifont \
patch \
nano \
sudo \
unzip \
git \
wget \
curl \
ttf-dejavu \
fonts-droid \
ttf-unifont \
fonts-sipa-arundina \
fonts-sil-padauk \
fonts-khmeros \
fonts-taml-tscu \
python-yaml
npm \
python3 \
python3-distutils

COPY slippymap.html /var/www/html/osm/
COPY style.css /var/www/html/osm/
COPY restart.sh /usr/local/bin/
COPY debs /tmp/debs
COPY tirex.conf.patch /tmp/
COPY mapnik.conf.patch /tmp/
RUN dpkg -i /tmp/debs/*deb

COPY slippymap.html style.css /var/www/html/osm/
COPY tileserver_site.conf /etc/apache2/sites-available/
COPY tirex.conf.patch mapnik.conf.patch /tmp/


RUN \
# tirex config
patch -l /etc/tirex/tirex.conf < /tmp/tirex.conf.patch \
&& patch -l /etc/tirex/renderer/mapnik.conf < /tmp/mapnik.conf.patch \
## install map styles
# osm-bright
&& mkdir -p /srv; cd /srv \
&& rm -rf /var/lib/mod_tile \
&& ln -s /var/lib/tirex/tiles /var/lib/mod_tile \
&& chown tirex:tirex -R /var/lib/tirex/tiles/

## get map styles and resources
RUN \
# osm-bright
mkdir -p /srv; cd /srv \
&& git clone https://github.com/mapbox/osm-bright.git \
&& cd osm-bright/ \
&& git remote add rory https://github.com/rory/osm-bright.git \
&& git fetch rory \
&& git checkout rory/master \
# osm-bright - get-shapefiles
&& mkdir shp; cd shp \
&& wget http://data.openstreetmapdata.com/simplified-land-polygons-complete-3857.zip \
&& wget https://osmdata.openstreetmap.de/download/simplified-land-polygons-complete-3857.zip \
&& unzip simplified-land-polygons-complete-3857.zip \
&& wget http://data.openstreetmapdata.com/land-polygons-split-3857.zip \
&& wget https://osmdata.openstreetmap.de/download/land-polygons-split-3857.zip \
&& unzip land-polygons-split-3857.zip \
&& wget http://mapbox-geodata.s3.amazonaws.com/natural-earth-1.4.0/cultural/10m-populated-places-simple.zip \
&& mkdir 10m-populated-places-simple; cd 10m-populated-places-simple; unzip ../10m-populated-places-simple.zip \
# openstreetmap-carto
&& mkdir -p /srv; cd /srv \
&& git clone https://github.com/gravitystorm/openstreetmap-carto \
&& cd openstreetmap-carto \
&& ./get-shapefiles.sh \
&& scripts/get-shapefiles.py \
# create tile directories
&& install -d -o tirex -g tirex /var/lib/tirex/tiles/osmbright/ \
&& install -d -o tirex -g tirex /var/lib/tirex/tiles/osmcarto/ \
&& rm -rf /var/lib/mod_tile \
&& ln -s /var/lib/tirex/tiles /var/lib/mod_tile \
&& chown tirex:tirex -R /var/lib/tirex/tiles/

EXPOSE 80

VOLUME ["/var/www", "/var/log/apache2", "/etc/apache2"]
&& install -d -o tirex -g tirex /var/lib/tirex/tiles/osmcarto/

COPY osmbright_configure.py /srv/osm-bright/configure.py
COPY osmbright.conf /etc/tirex/renderer/mapnik/
COPY osmcarto_project.yaml /srv/openstreetmap-carto/project.yaml
COPY osmcarto.conf /etc/tirex/renderer/mapnik/
COPY osmcarto_project.mml /srv/openstreetmap-carto/project.mml
COPY osmbright.conf osmcarto.conf /etc/tirex/renderer/mapnik/

RUN cd /srv/osm-bright \
RUN cd /srv \
# install carto
&& git clone https://github.com/mapbox/carto.git \
&& cd carto; git checkout v1.2.0 \
&& npm install -g carto \
# osm-bright style
&& cd /srv/osm-bright \
&& ./make.py \
&& cd OSMBright \
&& carto project.mml > project.xml \
&& cd /srv/openstreetmap-carto/scripts/; python yaml2mml.py \
&& carto /srv/openstreetmap-carto/project.mml > /srv/openstreetmap-carto/project.xml
&& cd OSMBright; carto project.mml > project.xml \
# osm-carto style
&& cd /srv/openstreetmap-carto; carto project.mml > project.xml

RUN apt-get update && apt-get install -y postgresql
COPY ./wait-for-postgres.sh /
COPY ./start.sh /usr/local/bin

CMD /usr/local/start.sh
EXPOSE 80

COPY ./run.sh /usr/local/bin
ENTRYPOINT ["usr/local/bin/run.sh"]

Binary file not shown.
Binary file removed debs/libapache2-mod-tile_0.4.12~jessie1_amd64.deb
Binary file not shown.
Binary file removed debs/tirex-backend-mapnik_0.4.2~jessie1_amd64.deb
Binary file not shown.
Binary file added debs/tirex-backend-mapnik_0.6.1~buster_amd64.deb
Binary file not shown.
Binary file removed debs/tirex-core_0.4.2~jessie1_amd64.deb
Binary file not shown.
Binary file added debs/tirex-core_0.6.1~buster_amd64.deb
Binary file not shown.
8 changes: 2 additions & 6 deletions mapnik.conf.patch
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,11 @@
< procs=3
---
> procs=6
37c37
< plugindir=/usr/lib/mapnik/input
---
> plugindir=/usr/lib/mapnik/2.2/input
42c42
43c43
< fontdir=/usr/lib/mapnik/fonts
---
> fontdir=/usr/share/fonts/
46c46
47c47
< #fontdir_recurse=0
---
> fontdir_recurse=1
Expand Down
6 changes: 3 additions & 3 deletions osmbright_configure.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

from os import path, getcwd, environ
from os import path, getcwd
from collections import defaultdict
config = defaultdict(defaultdict)

Expand All @@ -12,7 +12,7 @@
# in which the project is stored
config["name"] = "OSM Bright"

# The absolute path to your MapBox projects directory. You should
# The absolute path to your MapBox projects directory. You should
# not need to change this unless you have configured TileMill specially
config["path"] = path.expanduser("/srv/osm-bright")

Expand All @@ -34,7 +34,7 @@
# Land shapefiles required for the style. If you have already downloaded
# these or wish to use different versions, specify their paths here.
# You will need to unzip these files before running make.py
# These OSM land shapefiles are updated daily and can be downloaded at:
# These OSM land shapefiles are updated daily and can be downloaded at:
# - http://data.openstreetmapdata.com/simplified-land-polygons-complete-3857.zip
# - http://data.openstreetmapdata.com/land-polygons-split-3857.zip

Expand Down
Loading