X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=org.simantics.maps.server%2Fserver%2Ftileserver-mapnik%2FDockerfile;fp=org.simantics.maps.server%2Fserver%2Ftileserver-mapnik%2FDockerfile;h=e8110709b346a3797bf6dd52ce3f91c7b9fbdd40;hb=2529be6d456deeb07c128603ce4971f1dc29b695;hp=0000000000000000000000000000000000000000;hpb=2636fc31c16c23711cf2b06a4ae8537bba9c1d35;p=simantics%2Fdistrict.git diff --git a/org.simantics.maps.server/server/tileserver-mapnik/Dockerfile b/org.simantics.maps.server/server/tileserver-mapnik/Dockerfile new file mode 100644 index 00000000..e8110709 --- /dev/null +++ b/org.simantics.maps.server/server/tileserver-mapnik/Dockerfile @@ -0,0 +1,44 @@ +FROM node:0.10 +MAINTAINER Petr Sloup +# Based on work by Lukas Martinelli + +# make sure the mapbox fonts are available on the system +RUN mkdir -p /tmp/mapbox-studio-default-fonts && \ + mkdir -p /fonts && \ + git clone https://github.com/mapbox/mapbox-studio-default-fonts.git /tmp/mapbox-studio-default-fonts && \ + cp /tmp/mapbox-studio-default-fonts/**/*.otf /fonts && \ + cp /tmp/mapbox-studio-default-fonts/**/*.ttf /fonts && \ + rm -rf /tmp/mapbox-studio-default-fonts + +# download fonts required for osm bright +RUN wget -q -P /fonts https://github.com/aaronlidman/Toner-for-Tilemill/raw/master/toner4tilemill/fonts/Arial-Bold.ttf && \ + wget -q -P /fonts https://github.com/aaronlidman/Toner-for-Tilemill/raw/master/toner4tilemill/fonts/Arial-Regular.ttf && \ + wget -q -P /fonts https://github.com/aaronlidman/Toner-for-Tilemill/raw/master/toner4tilemill/fonts/Arial-Unicode-Bold-Italic.ttf && \ + wget -q -P /fonts https://github.com/aaronlidman/Toner-for-Tilemill/raw/master/toner4tilemill/fonts/Arial-Unicode-Bold.ttf && \ + wget -q -P /fonts https://github.com/aaronlidman/Toner-for-Tilemill/raw/master/toner4tilemill/fonts/Arial-Unicode-Italic.ttf && \ + wget -q -P /fonts https://github.com/aaronlidman/Toner-for-Tilemill/raw/master/toner4tilemill/fonts/Arial-Unicode-Regular.ttf + +ENV MAPNIK_FONT_PATH=/fonts + +RUN mkdir -p /usr/src/app && mkdir -p /project +WORKDIR /usr/src/app +# only install minimal amount of tessera packages +# be careful as some tessera packages collide with itself +RUN npm install \ + mbtiles@0.8.2 \ + tilelive-tmstyle@0.4.2 \ + tilelive-xray@0.2.0 \ + tilelive-http@0.8.0 + +COPY / /usr/src/app +RUN npm install + +VOLUME /data +ENV SOURCE_DATA_DIR=/data \ + DEST_DATA_DIR=/project \ + PORT=80 \ + MAPNIK_FONT_PATH=/fonts \ + DOMAINS= + +EXPOSE 80 +CMD ["/usr/src/app/run.sh"]