From 393ceffe5c69853f6b083785e5698686fe41e6f1 Mon Sep 17 00:00:00 2001 From: Lukas Martinelli Date: Fri, 18 Sep 2015 04:17:04 -0400 Subject: [PATCH] Run vectortile sample in tessera --- tileserver/.dockerignore | 1 + tileserver/Dockerfile | 22 +++++++++++++++++++--- tileserver/run_tessera.sh | 4 ++++ 3 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 tileserver/.dockerignore create mode 100755 tileserver/run_tessera.sh 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