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

Add new flexible parameters and new logic of using of nominatim-docker #394

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

altair86
Copy link

When I made these changes, my goal was:

to make nominatim deployment and update secure.

To do this, I added:

  • New parameter SKIP_IMPORT, which allows skipping imports when we have a "naive" container that is intended only for updating
  • I also had to add PGDATABASE to the documentation and change a few lines in which the nominatim database participates in order to avoid erroneous database deletion on production systems
  • Based on this, I added new work cases called "Using an external PostgreSQL database and configuring with updating the data container"

Thank you for your work

@what-the-diff
Copy link

what-the-diff bot commented Nov 14, 2022

  • Added PGDATABASE variable to init.sh and start.sh
  • Changed default value of PGDATABASE from nominatim to $PGDATABASE in init.sh
  • Fixed typo in line 49 (init script) - !-z -> ! -z

@@ -66,7 +70,7 @@ sudo -E -u postgres psql postgres -tAc "SELECT 1 FROM pg_roles WHERE rolname='ww
sudo -E -u postgres psql postgres -tAc "ALTER USER nominatim WITH ENCRYPTED PASSWORD '$NOMINATIM_PASSWORD'" && \
sudo -E -u postgres psql postgres -tAc "ALTER USER \"www-data\" WITH ENCRYPTED PASSWORD '${NOMINATIM_PASSWORD}'" && \

sudo -E -u postgres psql postgres -c "DROP DATABASE IF EXISTS nominatim"
sudo -E -u postgres psql postgres -c "DROP DATABASE IF EXISTS $PGDATABASE"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering why we even drop the database in the first place. Seems quite destructive.

@philipkozeny do you have an idea?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@leonardehrenfried because the OG maintainer started doing that in the initial version he released, never questioned if we should continue with that behaviour to be honest ...

sudo -u postgres psql postgres -c "DROP DATABASE IF EXISTS nominatim" && \

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That because I try to make it safely.
It's OK, if you could change name, I think

@KOPACb KOPACb mentioned this pull request Nov 14, 2024
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

Successfully merging this pull request may close these issues.

3 participants