Switch to the Mapbox OSM instance
authorTom Hughes <tom@compton.nu>
Mon, 11 Jan 2016 19:07:48 +0000 (19:07 +0000)
committerTom Hughes <tom@compton.nu>
Mon, 11 Jan 2016 19:07:48 +0000 (19:07 +0000)
cookbooks/web/definitions/rails_port.rb
cookbooks/web/recipes/rails.rb

index f0dd581..f3d89d0 100644 (file)
@@ -164,6 +164,10 @@ define :rails_port, :action => [:create, :enable] do
       line.gsub!(/^( *)nominatim_url:.*$/, "\\1nominatim_url: \"#{params[:nominatim_url]}\"")
     end
 
+    if params[:osrm_url]
+      line.gsub!(/^( *)osrm_url:.*$/, "\\1osrm_url: \"#{params[:osrm_url]}\"")
+    end
+
     if params[:google_auth_id]
       line.gsub!(/^( *)#google_auth_id:.*$/, "\\1google_auth_id: \"#{params[:google_auth_id]}\"")
       line.gsub!(/^( *)#google_auth_secret:.*$/, "\\1google_auth_secret: \"#{params[:google_auth_secret]}\"")
index 632a627..47010c7 100644 (file)
@@ -77,6 +77,7 @@ rails_port "www.openstreetmap.org" do
   windowslive_auth_id "0000000040153C51"
   windowslive_auth_secret web_passwords["windowslive_auth_secret"]
   mapzen_valhalla_key web_passwords["mapzen_valhalla_key"]
+  osrm_url "//api-osrm-routed-production.tilestream.net/viaroute"
 end
 
 package "libjson-xs-perl"