chairemobilite / transition

Transition is a modern new approach to transit planning. It's a web application to model, simulate and plan public transit and alternative transportation.
http://transition.city
MIT License
22 stars 13 forks source link

osrm: Use the host even for local servers #822

Closed tahini closed 9 months ago

tahini commented 9 months ago

fixes #821

This uses the value set in the mode config's host field even for local servers. This allows to specify a specific URL on which to join the server, for example an ipv4 url where 'localhost' would have resolved to an ipv6 url, or simply a named URL for the local server.

tahini commented 9 months ago

Shouldn't we add the host to the restart call a bit after this?

No, the host here is used locally for the mode registry, but is not used for the osrm-routed's host parameter (-i), so it is not required in the start/restart commands.

greenscientist commented 9 months ago

ok, yeah I see. Please add a bit of comments to explain why we need the hostname even when we use the autostart.

tahini commented 9 months ago

It's in the commit message, but I added it in the code too