# Question about openpoiservice docker compose

**URL:** <https://ask.openrouteservice.org/t/question-about-openpoiservice-docker-compose/5313>\
**Category:** openpoiservice\
**Created:** [October 2, 2023, 9:38am UTC](https://ask.openrouteservice.org/t/question-about-openpoiservice-docker-compose/5313 "2023-10-02T09:38:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![luke](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/luke/32/2523_2.png) [@luke](https://ask.openrouteservice.org/u/luke)\
**Post date:** [October 2, 2023, 9:38am UTC](https://ask.openrouteservice.org/t/question-about-openpoiservice-docker-compose/5313/1 "2023-10-02T09:38:28Z")

</div>

Hello.

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:

```auto
provider_parameters:
  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:

```auto
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

---

<div class="post-metadata">

**Author:** ![luke](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/luke/32/2523_2.png) [@luke](https://ask.openrouteservice.org/u/luke)\
**Post date:** [October 2, 2023, 9:57am UTC](https://ask.openrouteservice.org/t/question-about-openpoiservice-docker-compose/5313/2 "2023-10-02T09:57:42Z")

</div>

update:

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?

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

```

---

<div class="post-metadata">

**Author:** ![jschnell](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/jschnell/32/971_2.png) [@jschnell](https://ask.openrouteservice.org/u/jschnell)\
**Post date:** [October 18, 2023, 2:37pm UTC](https://ask.openrouteservice.org/t/question-about-openpoiservice-docker-compose/5313/3 "2023-10-18T14:37:28Z")

</div>

Hey,

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 🙂

Best regards

---

<div class="post-metadata">

**Author:** ![luke](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/luke/32/2523_2.png) [@luke](https://ask.openrouteservice.org/u/luke)\
**Post date:** [October 18, 2023, 3:05pm UTC](https://ask.openrouteservice.org/t/question-about-openpoiservice-docker-compose/5313/4 "2023-10-18T15:05:55Z")

</div>

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 😃

---

<div class="post-metadata">

**Author:** ![takb](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/takb/32/591_2.png) [@takb](https://ask.openrouteservice.org/u/takb)\
**Post date:** [October 23, 2023, 1:42pm UTC](https://ask.openrouteservice.org/t/question-about-openpoiservice-docker-compose/5313/5 "2023-10-23T13:42:11Z")

</div>

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](https://hub.docker.com/r/kartoza/postgis/)) for details on how to do that.

Regards
