Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remote postgres? #10

Open
mitcheaton1 opened this issue Aug 29, 2018 · 4 comments
Open

Remote postgres? #10

mitcheaton1 opened this issue Aug 29, 2018 · 4 comments

Comments

@mitcheaton1
Copy link

I think they added this to nominatim recently. The issue im having is trying to load the planet file from OSM into PG with the canary this which takes forever (I realized I needed lots of memory and disk space for the nodes). Then I would need to use pod anit-affinity in kubernetes to limit 1 container per node basically. I was wondering if you were going to at some point added support for hitting a remote postgres database?

@peter-evans
Copy link
Owner

peter-evans commented Aug 30, 2018

Looks possible by adding CONST_Database_DSN in local.php to point to a remote database.

@define('CONST_Database_DSN', 'pgsql://@/nominatim'); // <driver>://<username>:<password>@<host>:<port>/<database>

You can see the full list of defaults for Nominatim's settings here.

If I have some time I'll try adding this as an option via environment variables. It would be a feature better suited to this Docker image, rather than the one in this repository. It's almost the same image without all the GCP storage related functionality.

For now though, I suggest trying to add the above line to local.php and building your own Docker image. Since you won't need any of the GCP functionality I recommend trying it with this image instead. You might need to modify docker-entrypoint.sh to just start apache without building the local database.

@peter-evans
Copy link
Owner

Added an issue for this feature here: peter-evans/nominatim-docker#9

@mitcheaton1
Copy link
Author

Awesome. I'll give it a try. Thanks Peter!

@peter-evans
Copy link
Owner

Sure. Feel free to raise PRs for features you think are missing from these images.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants