-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_tileserver.sh
executable file
·53 lines (45 loc) · 1.21 KB
/
build_tileserver.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash
set -xeu
# Clone all the required git repos
set +e
git clone \
--branch=master \
https://github.com/chrissng/tileserver-docker.git
git clone \
--branch=master \
https://github.com/chrissng/osm2vectortiles.git
git clone \
--branch=master \
https://github.com/maputnik/editor.git
set -e
# TileServer-GL vector and raster tile server
pushd osm2vectortiles
git pull
## Clean images and volumes, refresh images
docker-compose down -v --remove-orphans
docker-compose rm -fv
docker volume ls -q | grep osm2vectortiles | xargs -r docker volume rm || true
docker-compose up -d postgis
rm -f export/tiles.mbtiles
rm -f import/singapore.osm.pbf
wget -P import https://s3.amazonaws.com/metro-extracts.mapzen.com/singapore.osm.pbf
docker-compose run import-external
docker-compose run import-osm
docker-compose run import-sql
docker-compose run \
-e BBOX="103.062, 0.807, 104.545, 1.823" \
-e MIN_ZOOM="0" \
-e MAX_ZOOM="22" \
export
docker-compose down -v --remove-orphans
popd
pushd tileserver-docker
git pull
cp ../osm2vectortiles/export/tiles.mbtiles export
popd
# Mapbox GL style editor
pushd editor
#git reset --hard d62575b9651fa7e132500f62684d7ecd9f326916
git pull
docker build -t maputnik/editor .
popd