Phoenix is a web framework for building building fast, reliable web applications in Elixir. This recipe helps you to get started with a Phoenix app on the Zerops platform.
You can either click the deploy button to deploy directly on Zerops, or manually copy the import yaml to the import dialog in the Zerops app.
- Phoenix 1.7 with LiveView for real-time features
- PostgreSQL database integration with Ecto
- Built with Bandit HTTP server (referenced in config/config.exs)
- Asset bundling with esbuild and Tailwind
- Email support via Swoosh
- Health check endpoint at
/status
- JSON handling with Jason
The application consists of:
- Phoenix Router handling incoming requests
- Database integration using Ecto
- LiveView for real-time features
- Asset pipeline with esbuild and Tailwind
- Email handling with Swoosh
Key endpoints:
GET /
- Main application entryGET /status
- Health check endpoint/live
- LiveView routes
Base of the recipe is ready for production. For production deployment, consider:
- Using highly available version of the PostgreSQL database (change
mode
fromNON_HA
toHA
in recipe YAML) - Using at least two containers for the Phoenix service (add
minContainers: 2
in recipe YAML)
Futher things to think about when running more complex, highly available pHOENIX production apps on Zerops:
- containers are volatile - use Zerops object storage to store your files
- Implement Redis (Valkey) for caching and session management
Need help setting your project up? Join Zerops Discord community.