wiktorn / Overpass-API

Overpass API docker image
MIT License
134 stars 48 forks source link

Run the container on already processed data #72

Closed duccioa closed 2 years ago

duccioa commented 3 years ago

Hello, I successfully run the image on a OSM file in a container overpass_api and the service was running smoothly. The data is in the folder /data/overpass_db/, the database is set with init_done, cookie.jar and db/. For various reason, I had to change docker's root and now docker does not see overpass_api container any more. I would like to run a new container without rebuilding the database again. Is it possible?

By the way, thank you for this docker image. It is very useful.

Best, Duccio

wiktorn commented 3 years ago

Yes, if you'll pass to the container the same parameters (such as OVERPASS_DIFF_URL) and mount the same directory under /db then container should detect, that database is already initialized and just continue. This is also the way I usually upgrade overpass version (recreate the container with new container image using the same /db folder and all environment parameters).

duccioa commented 3 years ago

Thank you, it works. If I may, just out of curiosity, what is this part of the process?

After 0h0m15s: in "recurse", part 0, on line 26. Stack: 0 of 0 218 of 0 0 of 0
After 0h0m30s: in "recurse", part 0, on line 27. Stack: 0 of 0 667 of 0 0 of 0
After 0h0m45s: in "recurse", part 0, on line 27. Stack: 0 of 0 1889 of 0 0 of 0
After 0h1m0s: in "recurse", part 0, on line 27. Stack: 0 of 0 2785 of 0 0 of 0
After 0h1m15s: in "recurse", part 0, on line 27. Stack: 0 of 0 3723 of 0 0 of 0
After 0h1m30s: in "recurse", part 0, on line 27. Stack: 0 of 0 4867 of 0 0 of 0
wiktorn commented 3 years ago

This is probably area generation process, see here. It's used when the query refers some geographical area by name, like this query:

  ( area[name="United Kingdom"]; )->.a;  /* or more selectively: */
  ( area["ISO3166-1"="GB"][admin_level=2]; )->.a;