I am trying to follow the description in README.
I first tried to create the docker from a windows 11 machine, but it fails to execute the run.sh script
I then followed the advice from someone here to do this in my virtual Ubuntu environment instead and that error disappeared.
But when it start working the sequence of steps to do becomes a bit unclear.
I start by updating categories_docker.yml file with some additional tags and download a pdf file for Sweden and store it in the osm folder
I then use the all-in-one docker container command
docker-compose -f /path/to/docker-compose.yml up api -d
And it works and creates an openpoiservice-api image, an openpoiservice-api container (called charming_mestof) and a kortoza/postgis image and a obs-db container.
The log for the charming_mestof (openpoiservice-api) contains the following:
2023-01-09 18:23:19 [2023-01-09 17:23:19 +0000] [7] [INFO] Starting gunicorn 20.0.4
2023-01-09 18:23:19 [2023-01-09 17:23:19 +0000] [7] [INFO] Listening at: http://0.0.0.0:5000 (7)
2023-01-09 18:23:19 [2023-01-09 17:23:19 +0000] [7] [INFO] Using worker: gevent
2023-01-09 18:23:19 [2023-01-09 17:23:19 +0000] [8] [INFO] Booting worker with pid: 8
2023-01-09 18:23:19 [2023-01-09 17:23:19 +0000] [9] [INFO] Booting worker with pid: 9
2023-01-09 18:23:19 [2023-01-09 17:23:19 +0000] [10] [INFO] Booting worker with pid: 10
2023-01-09 18:23:19 [2023-01-09 17:23:19 +0000] [11] [INFO] Booting worker with pid: 11
I then run the command init command
docker-compose -f /path/to/docker-compose.yml up init
which runs awhile and I assume updates the database according to the configuration. It completes successfully.
An image is created called openpoiservice-init and a container ops_init is created. The logfile for that is:
2023-01-09 17:24:43 INFO Found directory: /deploy/app/osm
2023-01-09 17:24:43 INFO Starting to import OSM data (1 files in batch)
2023-01-09 17:24:43 INFO Starting to read /deploy/app/osm/sweden-latest.osm.pbf
2023-01-09 17:24:43 INFO Parsing and importing nodes...
2023-01-09 17:31:48 INFO Found 404460 nodes
2023-01-09 17:31:48 INFO Parsing relations...
2023-01-09 17:31:52 INFO Found 18891 ways in relations
2023-01-09 17:31:52 INFO Parsing ways...
2023-01-09 17:32:20 INFO Found 981135 ways (including the ones found in relations)
2023-01-09 17:32:20 INFO Importing ways...
2023-01-09 17:55:16 INFO Found 1385595 POIs
2023-01-09 17:55:16 INFO Finished import of /deploy/app/osm/sweden-latest.osm.pbf
2023-01-09 17:55:16 INFO File import completed in 1832688.6 ms
2023-01-09 17:55:16 INFO Import complete.
2023-01-09 17:55:16 INFO Batch of 1 files completed in 1832704.51 ms
2023-01-09 17:24:42 Initializing POI database
Which looks great !!
Then it becomes confusing. Am I done now or should I run any more commands.
There is talk about BuufProtocolers (protobuf) for imposm.parser which is unclear if I need to do something
There is also talk about the openpoiservice/server/ops_settings.yml
and to export these settings, but I did the settings needed in the ops_setting_docker.yml
After this comes a section with c´Creating, Dropping and Parsing and importing data, which I assume is not necessary. And if I try to run any of those I need to install a lot of other python packages.
And then it is mentioned that I can access the application at localhost:5000
. If i put this in the browser, it states that it cannot be found.
What did I do wrong?
When I run my application to use the api, I get this error:
HTTPConnectionPool(host='localhost', port=5000): Max retries exceeded with url: //pois (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x0000022B8D21AB80>: Failed to establish a new connection: [WinError 10061]