Skip to content

Commit

Permalink
Update docker file
Browse files Browse the repository at this point in the history
  • Loading branch information
hannesj committed Feb 24, 2016
1 parent b2a4651 commit d3d73b0
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 15 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/
24 changes: 9 additions & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,38 +14,32 @@ RUN apt-get update \

RUN mkdir -p ${WORK}

RUN npm install tessera \
tilejson \
tilelive-http \
tilelive-otp-stops \
tilelive-hsl-parkandride \
mbtiles \
tilelive-xray \
forever
ADD . ${WORK}

RUN curl https://osm2vectortiles-downloads.os.zhdk.cloud.switch.ch/v1.0/extracts/finland.mbtiles > finland.mbtiles
RUN npm install

ADD xorg.conf ${WORK}/xorg.conf
#TODO: Replace when https://github.com/osm2vectortiles/osm2vectortiles/issues/114 is fixed
RUN curl http://koti.kapsi.fi/~hannes/tiles.mbtiles > finland.mbtiles
#RUN curl https://osm2vectortiles-downloads.os.zhdk.cloud.switch.ch/v1.0/extracts/finland.mbtiles > finland.mbtiles

RUN npm install https://github.com/hannesj/tilelive-gl.git

RUN npm install https://github.com/HSLdevcom/hsl-map-style.git

RUN cd ${WORK}/node_modules/hsl-map-style && \
unzip -P ${FONTSTACK_PASSWORD} fontstack.zip && \
sed -i -e "s#http://localhost:3000/#file://${WORK}/node_modules/hsl-map-style/#" hsl-gl-map-v8.json
sed -i -e "s#http://localhost:3000/#file://${WORK}/node_modules/hsl-map-style/#" hsl-gl-map-v8.json && \
sed -i -e 's#dev.digitransit.fi/#localhost:8080/#' hsl-gl-map-v8.json

COPY config.js ${WORK}/

EXPOSE 8088
EXPOSE 8080

#RUN chown -R 9999:9999 ${WORK}
#USER 9999

CMD Xorg -dpi 96 -nolisten tcp -noreset +extension GLX +extension RANDR +extension RENDER -logfile ./10.log -config ./xorg.conf :10 & \
sleep 15 && \
DISPLAY=":10" node_modules/.bin/forever start -c "node --harmony" \
node_modules/tessera/bin/tessera.js --port 8088 --config config.js \
node_modules/tessera/bin/tessera.js --port 8080 --config config.js \
-r ${WORK}/node_modules/tilelive-otp-stops/ \
-r ${WORK}/node_modules/tilelive-gl/ \
-r ${WORK}/node_modules/tilelive-hsl-parkandride \
Expand Down
29 changes: 29 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "hsl-map-server",
"version": "1.0.0",
"description": "HSL map server",
"main": "config.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/HSLdevcom/hsl-map-server.git"
},
"author": "HSLdevcom",
"license": "(AGPL-3.0 OR EUPL-1.2)",
"bugs": {
"url": "https://github.com/HSLdevcom/hsl-map-server/issues"
},
"homepage": "https://github.com/HSLdevcom/hsl-map-server#readme",
"dependencies": {
"forever": "^0.15.1",
"mbtiles": "^0.8.2",
"tessera": "^0.8.0",
"tilejson": "^1.0.1",
"tilelive-hsl-parkandride": "0.0.2",
"tilelive-http": "^0.10.0",
"tilelive-otp-stops": "^0.1.0",
"tilelive-xray": "^0.2.0"
}
}

0 comments on commit d3d73b0

Please sign in to comment.