Last active
April 16, 2020 12:54
-
-
Save bluetoothfx/22a939be64bbca0a36a59396c02249a0 to your computer and use it in GitHub Desktop.
Docker hosting OSRM backend & front end
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Open a folder & start to run below commands from terminal | |
| # download desired map segment (example Germany) | |
| wget http://download.geofabrik.de/europe/germany/berlin-latest.osm.pbf | |
| # Pre process data - Step 01 | |
| docker run -t -v "${PWD}:/data" osrm/osrm-backend osrm-extract -p /opt/car.lua /data/berlin-latest.osm.pbf | |
| # Step 02 | |
| > docker run -t -v "${PWD}:/data" osrm/osrm-backend osrm-partition /data/berlin-latest.osrm | |
| # Step 03 | |
| > docker run -t -v "${PWD}:/data" osrm/osrm-backend osrm-customize /data/berlin-latest.osrm | |
| # Last step: | |
| > docker run -t -i -p 5000:5000 -v "${PWD}:/data" osrm/osrm-backend osrm-routed --algorithm mld /data/berlin-latest.osrm | |
| ## To check please run following commands from terminal: | |
| curl "http://127.0.0.1:5000/route/v1/driving/13.388860,52.517037;13.385983,52.496891?steps=true" | |
| curl "http://127.0.0.1:5000/match/v1/driving/13.388860,52.517037;13.397634,52.529407;13.428555,52.523219?steps=true&geometries=polyline6&overview=full&annotations=false" | |
| If you need to run frontend: | |
| > docker run -p 9966:9966 osrm/osrm-frontend | |
| #references: | |
| https://github.com/Project-OSRM/osrm-backend | |
| https://hub.docker.com/r/osrm/osrm-backend/ | |
| https://github.com/Project-OSRM/osrm-frontend | |
| https://hub.docker.com/r/osrm/osrm-frontend/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment