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

<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, 5:04pm UTC](https://forum.elixirforum.com/t/docker-compose-phoenix-postgresql/15310/13 "2018-07-24T17:04:54Z")

</div>

I wouldn’t put create / migrate in your Dockerfile. Those are really something you do at runtime, not build time.

I would just `docker-compose exec` those commands after you up everything beforehand. Or if you were really gung-ho on having that done automatically on every container start you could put it into an entrypoint script but personally I don’t like doing that.

---

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