Me too!
That's why I created this Phoenix Docker Starter application. Please feel free to fork the code or copy the configuration you need to configure your own Phoenix Docker swarm.
That's okay, not everyone uses or likes umbrella applications. I've got you covered! Check out my non-umbrella branch of the project here!
https://github.com/benjamindburke/phoenix-umbrella-docker-starter/tree/non-umbrella
First, add your own application secrets to the files in docker-local/db.env and docker-local/dev.env.
Use these three commands to build the hello_web
Docker service locally:
mix deps.get
- We need the deps locally so Phoenix can generate a secure secret:
mix phx.gen.secret
- You should change your SECRET_KEY_BASE in docker-compose.yml but it isn't required for local development.
- We need the deps locally so Phoenix can generate a secure secret:
docker compose build
docker compose up
Now you can visit localhost:4000
from your browser.
Ready to run in production? Please check our deployment guides.
- Official website: https://www.phoenixframework.org/
- Guides: https://hexdocs.pm/phoenix/overview.html
- Docs: https://hexdocs.pm/phoenix
- Forum: https://elixirforum.com/c/phoenix-forum
- Source: https://github.com/phoenixframework/phoenix