diff --git a/tileserver/.dockerignore b/tileserver/.dockerignore new file mode 100644 index 0000000..6bc0d80 --- /dev/null +++ b/tileserver/.dockerignore @@ -0,0 +1 @@ +vector-tiles-sample diff --git a/tileserver/Dockerfile b/tileserver/Dockerfile index 7854af1..de9ad75 100644 --- a/tileserver/Dockerfile +++ b/tileserver/Dockerfile @@ -1,9 +1,25 @@ -FROM node:0.12.7 +FROM node:0.10 MAINTAINER Lukas Martinelli +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 + +ENV MAPNIK_FONT_PATH=/fonts + RUN npm install -g tessera -RUN npm install -g mbtiles tilelive-tmstyle tilelive-tmsource +RUN npm install -g mbtiles \ + tilelive-tmstyle \ + tilelive-http + +COPY run_tessera.sh /usr/src/app/run_tessera.sh VOLUME /data -WORKDIR /data + +EXPOSE 80 EXPOSE 8080 + +CMD ["/usr/src/app/run_tessera.sh"] diff --git a/tileserver/run_tessera.sh b/tileserver/run_tessera.sh new file mode 100755 index 0000000..e6c8e3a --- /dev/null +++ b/tileserver/run_tessera.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +PORT=80 tessera mbtiles:///data/countries.mbtiles & +PORT=8080 tessera tmstyle:///data/countries.tm2