mediagis / nominatim-docker

100% working container for Nominatim
Creative Commons Zero v1.0 Universal
1.03k stars 434 forks source link

External database gets recreated upon pod restart #549

Closed lucasmaj closed 3 months ago

lucasmaj commented 3 months ago

Trying to use external db via NOMINATIM_DATABASE_DSN env variables. However it appears that db is dropped and recreated upon every restart of nominatim container. Obviously it defeats the purpose. Please advise.

lucasmaj commented 3 months ago

Looks like /var/lib/postgresql/14/main/import-finished must be persisted between restarts.

Does it mean that even when using external postrgre db we still need to fuss around with persistent volumes for /var/lib/postgresql/14/main ?

leonardehrenfried commented 3 months ago

Unfortunately, there is no advice to give. What you're doing just happens to work but it's actually not something that the core contributors use and therefore it's unsupported.

lucasmaj commented 3 months ago

Thank you for clarifying. I was coming with k8s bias where workers are easily disposable and managing stateful disks attached to particular nodes seems anti-pattern. Your answer made me realize the intended purpose is most likely a full VM with attached disks.

Thank you.

leonardehrenfried commented 3 months ago

Indeed. We are aware that our setup is not adhering to principles of more complex deployments but we value the ease of setup and operation over pretty much anything else.

Maybe https://github.com/smithmicro/n7m meets your requirements.

lucasmaj commented 3 months ago

Good insights. Thanks again!