This is a repo for deploying a minimal but production-ready Elixir Phoenix application for deployment on Seenode.
This example demonstrates how to deploy a simple Phoenix app with a working API endpoint and modern web interface.
View our guide on deploying Phoenix apps on seenode in seconds.
- Connect Your Repository: Go to the Seenode dashboard, select New Web Service, and choose this Git repository.
- Confirm Settings: Seenode will detect the Elixir environment and suggest the correct commands.
- Build Command:
mix local.hex --force && mix local.rebar --force mix deps.get --only prod MIX_ENV=prod mix compile MIX_ENV=prod mix assets.build MIX_ENV=prod mix assets.deploy
- Start Command:
MIX_ENV=prod mix phx.server
- Build Command:
- Deploy: Click Create Web Service.
That's it! Your Phoenix app will be deployed and available at a public URL.
Required for Production:
SECRET_KEY_BASE
: Generate this withmix phx.gen.secret
in your project root. This is used to sign/encrypt cookies and other secrets.
- Production-Ready: Your Phoenix app runs in a managed Elixir environment with optimized performance and reliability.
- Port Binding: This example is configured to listen on port 80 by default in production. The app will automatically bind to port 80 unless overridden by the PORT environment variable.
- API Endpoint: Includes a working
/api
endpoint that returns JSON responses for easy testing and integration. - Seamless Scaling: Scale your service horizontally or vertically with a few clicks from the Seenode dashboard as your traffic grows.
- Live Reload: Development-friendly with automatic code reloading and asset compilation.
To start your Phoenix server locally:
- Run
mix setup
to install and setup dependencies - Start Phoenix endpoint with
mix phx.server
or inside IEx withiex -S mix phx.server
- Visit
localhost:4000
from your browser - Test the API at
localhost:4000/api
- 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