# Docker-compose phoenix postgresql

**URL:** <https://forum.elixirforum.com/t/docker-compose-phoenix-postgresql/15310>\
**Category:** Questions\
**Tags:** docker, phoenix, postgres\
**Created:** [July 24, 2018, 10:41am UTC](https://forum.elixirforum.com/t/docker-compose-phoenix-postgresql/15310 "2018-07-24T10:41:24Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![cnck1387](https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/c/2bfe46/32.png) [@cnck1387](https://forum.elixirforum.com/u/cnck1387)\
**Post date:** [July 24, 2018, 1:55pm UTC](https://forum.elixirforum.com/t/docker-compose-phoenix-postgresql/15310/9 "2018-07-24T13:55:22Z")

</div>

Each service needs its own reference to environment variables. You’ll want to add it to the phoenix service too.

You could also put those ENV variables into a file, such as a `.env` file and then load it in both services with `env_file` in compose (instead of inlining and duplicating them with `environment`).

---

_[View the full topic](https://forum.elixirforum.com/t/docker-compose-phoenix-postgresql/15310)._
