# Local docker database connection

**URL:** <https://discuss.huggingface.co/t/local-docker-database-connection/60027>\
**Category:** Spaces\
**Created:** [October 26, 2023, 12:55pm UTC](https://discuss.huggingface.co/t/local-docker-database-connection/60027 "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](https://discuss.huggingface.co/u/leo-bourrel)\
**Post date:** [October 26, 2023, 12:55pm UTC](https://discuss.huggingface.co/t/local-docker-database-connection/60027/1 "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](https://discuss.huggingface.co/u/radames)\
**Post date:** [October 27, 2023, 12:45am UTC](https://discuss.huggingface.co/t/local-docker-database-connection/60027/2 "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
