# Running discourse with Postgres running in docker

**URL:** https://meta.discourse.org/t/running-discourse-with-postgres-running-in-docker/216803
**Category:** Development
**Created:** [February 2, 2022, 6:21am UTC](https://meta.discourse.org/t/running-discourse-with-postgres-running-in-docker/216803 "2022-02-02T06:21:15Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![phil22](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/phil22/32/248480_2.png) [@phil22](https://meta.discourse.org/u/phil22)
#### Post date: [February 2, 2022, 3:27pm UTC](https://meta.discourse.org/t/running-discourse-with-postgres-running-in-docker/216803/2 "2022-02-02T15:27:20Z")

</div>

I’m not certain, but I think the problem is probably that discourse is running inside a docker container, and so can’t by default access your separate postgres container.

I _think_ you need to expose the databse using this kind of configuration [GitHub - discourse/discourse\_docker: A Docker image for Discourse · GitHub](https://github.com/discourse/discourse_docker#expose)

You may also need to remove the postgres template from the app.yml file.

[These docs](https://meta.discourse.org/t/running-discourse-with-a-separate-postgresql-server/46375) might be helpful - whilst you’re not running on a separate server everything else should be relevant.

Hope this helps!

---

_[View the full topic](https://meta.discourse.org/t/running-discourse-with-postgres-running-in-docker/216803)._
