Add Dockerfile, proper scripts and update README (issue #1)

This commit is contained in:
Petr Sloup 2016-03-03 15:51:53 +01:00
parent eb70e8bb0d
commit e39ae90bc8
4 changed files with 28 additions and 0 deletions

3
.dockerignore Normal file
View file

@ -0,0 +1,3 @@
.git
node_modules
test_data

17
Dockerfile Normal file
View file

@ -0,0 +1,17 @@
FROM node:5.7.1
MAINTAINER Petr Sloup <petr.sloup@klokantech.com>
RUN apt-get -qq update \
&& DEBIAN_FRONTEND=noninteractive apt-get -qq -y install \
xvfb \
&& apt-get clean
RUN mkdir -p /usr/src/app
COPY / /usr/src/app
RUN cd /usr/src/app && npm install
VOLUME /data
WORKDIR /data
EXPOSE 80
CMD ["/usr/src/app/run.sh"]

View file

@ -1,8 +1,14 @@
# tileserver-gl
## Installation
### Docker
- `docker run -it -v $(pwd):/data -p 8080:80 klokantech/tileserver-gl`
### Without docker
- Make sure you have Node v4 or higher (`nvm install 4`)
- `npm install`
- `node src/main.js`
## Configuration

2
run.sh Executable file
View file

@ -0,0 +1,2 @@
#!/bin/bash
xvfb-run --server-args="-screen 0 1024x768x24" node /usr/src/app/src/main.js -p 80 -c /data/config.json