nominatim-k8s icon indicating copy to clipboard operation
nominatim-k8s copied to clipboard

Remote postgres?

Open mitcheaton1 opened this issue 7 years ago • 4 comments
trafficstars

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?

mitcheaton1 avatar Aug 29 '18 21:08 mitcheaton1

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 avatar Aug 30 '18 01:08 peter-evans

Added an issue for this feature here: https://github.com/peter-evans/nominatim-docker/issues/9

peter-evans avatar Aug 30 '18 01:08 peter-evans

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

mitcheaton1 avatar Aug 31 '18 20:08 mitcheaton1

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

peter-evans avatar Sep 02 '18 02:09 peter-evans