wiktorn / Overpass-API

Overpass API docker image
MIT License
140 stars 49 forks source link

Welcome to nginx #2

Closed ghost closed 5 years ago

ghost commented 6 years ago

Ok, this is probably a really stupid question but I'm pretty new to all this, 'how do I use this'?

I've been using https://overpass-turbo.eu/ but keep hitting rate limiting and query timeouts so decided to give wiktorn/Overpass-API a try. I initialized with the following command:

docker run \
  -e OVERPASS_META=yes \
  -e OVERPASS_MODE=clone \
  -e OVERPASS_DIFF_URL=https://planet.openstreetmap.org/replication/minute/ \
  -v ${HOME}/overpass:/db \
  -p 12346:80 \
  -i -t \
  --name overpass_world \
  wiktorn/overpass-api

I had to leave the office that evening so suspended my machine, leaving one of the downloads hanging.

When I returned in the morning, I restarted the container, and opened localhost:12346 - I was greeted by the "Welcome to Nginx" page.

The logs looked like this :

2018-06-22 09:28:28,329 CRIT Supervisor running as root (no user in config file)
2018-06-22 09:28:28,334 INFO supervisord started with pid 1                   
2018-06-22 09:28:29,339 INFO spawned: 'overpass_dispatch' with pid 9    
2018-06-22 09:28:29,341 INFO spawned: 'nginx' with pid 10               
2018-06-22 09:28:29,343 INFO spawned: 'fcgiwrap' with pid 11          
2018-06-22 09:28:29,345 INFO spawned: 'apply_diff' with pid 12
2018-06-22 09:28:29,347 INFO spawned: 'fetch_diff' with pid 15
2018-06-22 09:28:29,350 INFO spawned: 'dispatcher_areas' with pid 18           
2018-06-22 09:28:29,354 INFO spawned: 'areas_rules' with pid 19                 
2018-06-22 09:28:29,380 INFO exited: apply_diff (exit status 1; not expected)
2018-06-22 09:28:31,135 INFO success: overpass_dispatch entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2018-06-22 09:28:31,135 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2018-06-22 09:28:31,135 INFO success: fcgiwrap entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2018-06-22 09:28:31,139 INFO spawned: 'apply_diff' with pid 47
2018-06-22 09:28:31,140 INFO success: fetch_diff entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2018-06-22 09:28:31,140 INFO success: dispatcher_areas entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2018-06-22 09:28:31,141 INFO success: areas_rules entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2018-06-22 09:28:32,427 INFO success: apply_diff entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)                                                                      

I entered the container, executed the download_clone command, and allowed it to complete.

docker exec -ti overpass_world bash
/app/bin/download_clone.sh --db-dir=/db/db --source=http://dev.overpass-api.de/api_drolbr/ --meta=yes

I then stopped and started the container, but still just get the "Welcome to Nginx" home page.

I just went to http://overpass-turbo.eu (changing from https to http) - and changed the settings so it would send reqests to http://localhost:12346/api/

Tested it, and tada ! it worked !

So I suggest document how to use (although its obvious to anyone in the community ) and perhaps add my workaround for the failed initial download.

TheMoroccan09 commented 6 years ago

the link to download http://dev.overpass-api.de/api_drolbr/ doesn't work. i get forbidden reponse

wiktorn commented 6 years ago

@TheMoroccan09 It looks like there is now a problem with downloading a clone from Overpass. This is not specific to Docker image and should be reported in drolbr/Overpass-API