Building the image
docker build -t valhalla .
Generating the tiles
Before Valhalla can run we need to generate the tiles it will use for routing.
Create a data directory at the root of this repo
Then download the opensteetmap files for the regions you are interested in. For
example if you want to have routing in New York grab the corresponding osm.pbf file from
cd data wget http://download.geofabrik.de/north-america/us/new-york-latest.osm.pbf
Also we need to fetch a configuration file for valhalla. You can grab the one here and place it in
the data folder as well.
Finally run the generate_tiles.sh script
which will generate the tiles in the data directory.
Starting the server
Finally to start the server run
which will start the server running on port 5432 (you can change this by editing start_server.sh).
Alternatively run the docker command
docker run --rm -p 5432:8002/tcp -it -v $(pwd)/data:/data/valhalla valhalla
If you are using docker machine you can grab the ip of the instance by running
docker-machine ip default
then simply point your browser or curl or whatever at that ip and port 5432.
Relatively new to Docker, if you have updates or improvements to this repo
pull requests are very welcome