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

Allow persistence volume for Nominatim data

Open PremyslCerny opened this issue 5 years ago • 5 comments
trafficstars

It would be nice (if it is not yet possible) to specify an external volume, where all Postgre + Nominatim data can be persisted, so that after restart of the container it does not take days to recreate the database and start the Nominatim service (which happens when user wants to use bigger data, such as Europe: https://download.geofabrik.de/europe-latest.osm.pbf). If it is or when it is possible, it would be nice to see entry in README on how to do it.

PremyslCerny avatar May 18 '20 12:05 PremyslCerny

Hi @PremyslCerny

The original solution for my own use case was to persist data in object storage. See nominatim-k8s. I don't personally use either of these images now, so I'm just supporting. To be perfectly honest, if I was to redesign from scratch today I wouldn't have Postgres in the same container. My recommendation would be use a seperate Postgres instance which you can configure to persist data.

I can't promise anything soon, but I'll see if I can find some time to work on a feature to support remote Postgres containers.

peter-evans avatar Jun 13 '20 02:06 peter-evans

how wold it be to commit on the running conainter to have a new image?

mpi42 avatar Sep 05 '20 21:09 mpi42

What about creating a VOLUME with the Postgres data? For example, making the whole /var/lib/postgresql/9.5/main as a mounted volume. So if the container is restarted the databases should be up and running. What else should be persisted? Thanks in advance.

federicoalvarez-github avatar Sep 25 '20 19:09 federicoalvarez-github

For the past couple of hours I've been trying to get it to work with Volumes, but with no luck. I think the problem is that I cannot tell nominatim to "just run". It always has to perform the setup.php.

Is there a way to execute nominatim with out reprocessing the data?

federicoalvarez-github avatar Sep 25 '20 23:09 federicoalvarez-github

I am not a professional with docker, but can you take a look to this docker image?

https://github.com/Overv/openstreetmap-tile-server

It has the same database in a external volume with no problem. May be help you.

certifirm avatar Oct 03 '20 08:10 certifirm