Question about openpoiservice docker compose


Im wondering about the docker compose for the openpoiservice.

Everything runs fine in my docker environment. However im wishing to push this to azure container apps and running it there. The problem is the networking defined in the docker compose and ops-settings doesn’t really translate that well since they are referencing docker containers:

  table_name: ops_planet_pois
  db_name: gis
  user_name: gis_admin
  password: admin
  host: ops-db
  port: 5432
  port_tests: 5432

Can i somehow change the host to an external one?

Another issue i have is when pushing said containers to Azure, only two databases are created and not the GIS database:

2023-10-02T08:16:22.663285172Z  template0 | postgres  | UTF8     | C.UTF-8 | C.UTF-8 | =c/postgres          +
2023-10-02T08:16:22.663289119Z            |           |          |         |         | postgres=CTc/postgres
2023-10-02T08:16:22.663292957Z  template1 | postgres  | UTF8     | C.UTF-8 | C.UTF-8 | =c/postgres          +
2023-10-02T08:16:22.663296774Z            |           |          |         |         | postgres=CTc/postgres
2023-10-02T08:16:22.663300571Z (4 rows)

If anyone have some input or knowledge why this is, please provide me with some intel. Have a great monday


Playing around with psql in the console seems to verify that the db and tables have been created. Now i just need help connecting to the actual db.

What should the connection_string look like?

SQLALCHEMY_DATABASE_URI = 'postgresql://gis_admin:admin@localhost:5432/gis'


this reads like it is not an issue with the openrouteservice, but with your personal setup regarding postgresql and sqlalchemy. Have a look at their respective documentation on how to do that :slight_smile:

Best regards

Hey. It’s more about how to customize the postgis database included in openpoiservice to allow external IP connections since it doesn’t seem to do it with the out-of-the-box solution.

The same problem occurs when running the postgis container as an external container, not ni the same network as the API and the INIT.

Hope that explains it better :smiley:

Hi luke,

the postgis DB used by openpoiservice isn’t supposed to be connected to directly, we provide a flask API to query the data the openpoiservice keeps. If you still want to connect to the postgis database yourself, you’ll have to modify the settings in the docker-compose.yml file accordingly. Please refer to the postgis documentation of the documentation or the postgis docker image by kartoza that we use (Docker) for details on how to do that.