- Tiles are generated from OSM Planet PBF, using PostGIS, Imposm, Mapnik, and Tilelive.
- Tiles are served with Apache, mod_wsgi, and Tilestache.
- Tiles are written to a MBTiles file in the
/export/tile
volume of the generation docker container and served from the/export/tile
volume of the server container(s). - Typically one would have a
/export/tile-a
and/export/tile-b
on the host, and alternate mounting them to server or generation containers. - During generation a preview live tile server will run on port 8888 of the generation container.
- High level generation status is written out, and served at
/status.txt
if a server and the generating container share the/export/tile
volume. - The included script tile.sh somewhat simplifies use, run without arguments for help.
-
On the host, make volumes (preferably all on SSDs):
mkdir -p /export/tile-a /export/tile-b # to hold tiles mkdir -p /export/build # to hold PostGIS DB mkdir -p /export/scratch # cache, temp files etc
-
Backup
/export/tile-*/*.mbtiles
if you wish to backup the rendered tiles. Backup/export/build
only if needed for style development.
Make two persistent instances for "A" and "B", on port 8080 and 8081 respectively.
sudo docker run --name tile-a -p 8080:80 -v /export/tile-a:/export/tile:ro --log-opt max-size=100m --log-opt max-file=10 --restart=unless-stopped -d tile/ts
sudo docker run --name tile-b -p 8081:80 -v /export/tile-b:/export/tile:ro --log-opt max-size=100m --log-opt max-file=10 --restart=unless-stopped -d tile/ts
Run generation container on "A" or "B" (replace XXX
below):
sudo docker run --name gen-XXX -p 8888:8888 -v /export/tile-XXX:/export/tile -v /export/build:/export/build -d tile/tg
- A: http://localhost:8080/tiles/osm/{z}/{x}/{y}.png
- B: http://localhost:8081/tiles/osm/{z}/{x}/{y}.png
sudo docker ps
sudo docker logs tile-a
sudo docker logs gen-a
sudo docker start tile-a
sudo docker stop tile-a
sudo docker rm gen-a gen-b
sudo docker build -t tile/ts server
sudo docker build -t tile/tg gen