Докер образ с TileOven

master
Vitaliy Filippov 2018-11-11 02:14:00 +03:00
commit 384cf59541
8 changed files with 51 additions and 0 deletions

18
Dockerfile Normal file
View File

@ -0,0 +1,18 @@
FROM debian:sid
MAINTAINER Vitaliy Filippov
ADD etc /etc
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confdef" \
-o Dpkg::Options::="--force-confold" install -y wget git zip unzip mc locales less procps ca-certificates lsb-release \
build-essential curl gnupg2 fontconfig fonts-noto && \
(curl -sL https://deb.nodesource.com/setup_8.x | bash -) && \
DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" install -y nodejs && \
apt-get -y clean
RUN cd /home && mkdir data && git clone https://github.com/florianf/tileoven && cd tileoven && npm install
ADD config.json /home/tileoven/config.json.tmpl
CMD cd /home/tileoven && perl -pe 's/TILEOVEN_HOST/$ENV{TILEOVEN_HOST}/g' < config.json.tmpl > config.json && nodejs index.js --config=config.json

10
README Normal file
View File

@ -0,0 +1,10 @@
Сборка:
docker build -t tileoven .
Запуск:
docker run --name tileoven -v tileoven:/home/data \
-v /var/run/postgresql:/var/run/postgresql \
-e TILEOVEN_HOST=your-host.ru \
-p 20008:20008 -p 20009:20009 -t -d tileoven

12
config.json Normal file
View File

@ -0,0 +1,12 @@
{
"port": 20009,
"tilePort": 20008,
"tileUrl": "TILEOVEN_HOST:20008",
"files": "/home/data",
"examples": true,
"sampledata": true,
"host": "TILEOVEN_HOST",
"listenHost": "0.0.0.0",
"server": true,
"verbose": "on"
}

4
etc/apt/apt.conf Normal file
View File

@ -0,0 +1,4 @@
APT::Install-Suggests false;
APT::Install-Recommends false;
Acquire::Retries 5;
Binary::apt::APT::Keep-Downloaded-Packages "false";

1
etc/apt/sources.list Normal file
View File

@ -0,0 +1 @@
deb http://http.debian.net/debian/ sid main contrib non-free

2
etc/locale.gen Normal file
View File

@ -0,0 +1,2 @@
en_US.UTF-8 UTF-8
ru_RU.UTF-8 UTF-8

1
etc/localtime Symbolic link
View File

@ -0,0 +1 @@
/usr/share/zoneinfo/Europe/Moscow

3
yaml2mml.py Normal file
View File

@ -0,0 +1,3 @@
#!/usr/bin/env python
import sys, yaml, json
json.dump(yaml.safe_load(sys.stdin), sys.stdout, indent=2)