# Local docker database connection

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Flocal-docker-database-connection%2F60027%3E%5C
**Category:** Spaces\
**Created:** [October 26, 2023, 12:55pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Flocal-docker-database-connection%2F60027 "2023-10-26T12:55:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![leo-bourrel](https://avatars.discourse-cdn.com/v4/letter/l/e5b9ba/32.png) [@leo-bourrel](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fleo-bourrel)%5C
**Post date:** [October 26, 2023, 12:55pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Flocal-docker-database-connection%2F60027%2F1 "2023-10-26T12:55:10Z")

</div>

Hello,

I have an error with my Docker spaces which contains both a postgres image and a streamlit app. I succesfully ran both in the same container, but now I can’t reach postgres because `host.docker.internal` does not exists.  
The problem doesn’t happen if I run the app locally.

> **[leo-bourrel/test-streamlit · Discussions](https://huggingface.co/spaces/leo-bourrel/test-streamlit/discussions)**
>
> We’re on a journey to advance and democratize artificial intelligence through open source and open science.

Any idea how I can fix this problem ?

Thanks !

---

<div class="post-metadata">

**Author:** ![radames](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/radames/32/28246_2.png) [@radames](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fradames)%5C
**Post date:** [October 27, 2023, 12:45am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Flocal-docker-database-connection%2F60027%2F2 "2023-10-27T00:45:04Z")

</div>

hi @leo-bourrel ,

I sent you suggestions as [PR](https://huggingface.co/spaces/leo-bourrel/test-streamlit/discussions/1)  
Another note, you’re exposing your OpenAI key. Please make sure you use Secrets instead on Variables, they’re essentially the same, but one is private and the other one is public
