bmwcarit / barefoot

Java map matching library for integrating the map into software and services with state-of-the-art online and offline map matching that can be used stand-alone and in the cloud.
Apache License 2.0
666 stars 186 forks source link

make port part of the import script #14

Closed oldgitdaddy closed 8 years ago

oldgitdaddy commented 8 years ago

I propose the change to run OSM database on different ports. Please test and merge. Cheers.

smattheis commented 8 years ago

Thanks for the pull request. Can you explain your use case in more detail?

Please consider, if you run the import script inside the container, you would need to change the port of the PostgreSQL DB as well (which is not done by the import script and the DB uses the PostgreSQL standard port 5432). In case you want the DB to listen on a different port for querying the DB from outside the container and to avoid conflicts with another PostgreSQL DB, you can use Docker's port mapping as follows:

sudo docker run -t -i -p <port>:5432 --name="barefoot-oberbayern" \
-v ${PWD}/bfmap/:/mnt/bfmap -v ${PWD}/docker/osm/:/mnt/osm barefoot

where <port> is your desired port that the DB listens to from outside then. This, however, wouldn't need a different port in the import script. (... well that's the theory, but I never tested it. :) )

oldgitdaddy commented 8 years ago

Thanks for your explanation. Solution is also ok for me. If no objection, I will close the pull request. Cheers

smattheis commented 8 years ago

If the port mapping of Docker satisfies your use case, please close the pull request. Anyways, I appreciate your motivation for contribution. Feel free to file an issue, if there's any problem or feature request.