Download sample data when running docker image without config (close #23)

This commit is contained in:
Petr Sloup 2016-07-13 14:03:41 +02:00
parent 14f406cc34
commit a310c130f3
2 changed files with 10 additions and 0 deletions

View file

@ -4,6 +4,7 @@ MAINTAINER Petr Sloup <petr.sloup@klokantech.com>
RUN apt-get -qq update \
&& DEBIAN_FRONTEND=noninteractive apt-get -y install \
curl \
unzip \
build-essential \
python \
libcairo2-dev \

9
run.sh
View file

@ -1,2 +1,11 @@
#!/bin/bash
if [ ! -f /data/config.json ]; then
echo "INFO: No config.json found! Downloading sample data..."
echo "--------------------------------------------------------------------------------"
curl -L -o sample_data.zip https://github.com/klokantech/tileserver-gl-data/archive/v0.8.0.zip
unzip -q sample_data.zip -d sample_data
mv sample_data/tileserver-gl-data-*/* -t /data
rm sample_data.zip
rm -r sample_data
fi
xvfb-run -a -e /dev/stdout --server-args="-screen 0 1024x768x24" node /usr/src/app/src/main.js -p 80 -c /data/config.json