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

Information for restarting the container #594

Open
mirkomaty opened this issue Dec 22, 2024 · 3 comments
Open

Information for restarting the container #594

mirkomaty opened this issue Dec 22, 2024 · 3 comments

Comments

@mirkomaty
Copy link

Is your feature request related to a problem? Please describe.
I started the container using the command from the documentation:

docker run -it --shm-size=16g \
  -e PBF_URL=http://download.geofabrik.de/europe/germany-latest.osm.pbf \
  -e REPLICATION_URL=http://download.geofabrik.de/europe/germany-updates/ \
  -e IMPORT_WIKIPEDIA=false \
  -e NOMINATIM_PASSWORD=Haf9LiIp#Pah \
  -v /var/www/nominatim/app/data:/var/lib/postgresql/16/main \
  -v /var/www/nominatim/app/flat:/nominatim/flatnode \
  -p 127.0.0.1:5006:8080 \
  --name nominatim \
  mediagis/nominatim:4.5

But this opens a Terminal Session, which is not, what most people need. So I wanted to restart the container with different parameters. But I wasn't able to start the container based on the data that had already been generated. Every restart of the container seems to rebuild the data.

Describe the solution you'd like
I would appreciate finding a description of parameters that can be used to start the container based on the already existing data. It would also be helpful to know whether you can start the container with --restart-unless-stopped.
Maybe this information already exists somewhere, but I haven't found it yet.

@mirkomaty
Copy link
Author

I just stumbled over issue #577. There is obviously a piece of information here that "less-skilled users" (like me) miss. I understand Issue #577 like this: If I start the container on a system and the system needs a reboot, then the entire database is downloaded again and rebuilt. That can't be the final answer?! What am I missing here (and possibly other less-skilled users)?

@leonardehrenfried
Copy link
Collaborator

leonardehrenfried commented Dec 23, 2024

There is no UI included in this container image. A terminal session and an API is all you will receive.

Your command line looks correct and your database state should be saved. I cannot say what the problem is based on your description.

@mirkomaty
Copy link
Author

Thanks @leonardehrenfried for your answer. Here seems to be the missing piece of information. After successful import there exists a file import-finished at this location: /var/lib/postgresql/16/main/import-finished. The main folder is mounted to my host system, so everything should be fine. Maybe other people find this information useful, so it might make sense to add it to the documentation.

I don't know why my system rebuilt the import on the first restart, but it could be that I did something wrong here. The file now exists at the share and I hope that with the next restart the data will be used.

A terminal session and an API is all you will receive.

The API is all I need and expected to be there. The terminal session with -it is unnecessary because I can open a terminal for the running container at any time.

Again, thanks for spending your time to answer the question.

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

No branches or pull requests

2 participants