A Provisiofile is provided which will set up a CentOS 7 server ready to provide map data. See provisio for more information.
- Install Provisio:
curl -s https://raw.githubusercontent.com/bwindsor/Provisio/master/provisio > /usr/bin/provisio
chmod +x /usr/bin/provisio
- Grab the Provisiofile from this repository
curl -s https://raw.githubusercontent.com/bwindsor/osm-server/master/Provisiofile > Provisiofile
- The Provisiofile currently downloads the UK and NI sections of the world and merges them. If required, modify the
declare_list_of_map_files_to_downloadtask at the very top of theProvisiofileto import sections of your choice. If you want to prerender tiles, you should edit theprerender_tilestask to callrender_list_geowith the required arguments. See tile pre-rendering. - Run the provisioner.
The
NO_MAP_IMPORTenvironment variable tells the provisioner that it NOT download or import any map data. TheUPDATING_REPOenvironment variable tells the provisioner that it should pull the latest code from this repo (requires internet). If you subsequently re-run the provisioner, for example if you have updated the map style, but NOT the map data itself, you should set the environment variableNO_MAP_IMPORTto save hours wasted waiting for the database import when the map data hasn't even changed.
provisio up
On subsequent runs, to prevent a re-import of the map
export NO_MAP_IMPORT=1
provisio up
Sometimes, for some reason, when you restart the tile server it might fail to clean up the apache PID file, which leads to the web server not starting correctly. If this happens, you can delete this file manually with
docker exec -it --user root $(docker ps | grep tile-server | awk '{print $1;}') /bin/bash -c 'rm -f $APACHE_PID_FILE'
and then restart the containers with docker-compose restart.
- Run Provisio as above on an internet connected machine
- Burn a disc (or equivalent) containing the following
provisioProvisiofile- Entire
.provisiofolder which will have been created in the same directory as where you ran provisio up from
- Import the contents of this disc, put provisio on the path and make sure its executable, and from the same folder which contains the
Provisiofileand.provisiofolder, and thenprovisio up.