# 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:** 4

<div class="post-metadata">

**Author:** ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)\
**Post date:** [February 2, 2022, 4:03pm UTC](https://meta.discourse.org/t/running-discourse-with-postgres-running-in-docker/216803/4 "2022-02-02T16:03:40Z")

</div>

> [@abdellani](#):
>
> `PG::ConnectionBad: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory`

That means Discourse is trying to connect via a filesystem socket and that socket doesn’t exists.

Can you try adding a `port: 5432` to the `config/database.yml` file, under the development section?

---

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