https://github.com/zeropsio/recipe-phoenix
A Basic Phoenix Recipe on Zerops
https://github.com/zeropsio/recipe-phoenix
elixir-lang phoenix zerops zerops-recipe
Last synced: about 2 months ago
JSON representation
A Basic Phoenix Recipe on Zerops
- Host: GitHub
- URL: https://github.com/zeropsio/recipe-phoenix
- Owner: zeropsio
- Created: 2024-08-14T03:50:24.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-02-24T12:07:47.000Z (over 1 year ago)
- Last Synced: 2025-03-15T22:48:41.141Z (over 1 year ago)
- Topics: elixir-lang, phoenix, zerops, zerops-recipe
- Language: Elixir
- Homepage:
- Size: 55.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Zerops x Phoenix
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.

## Deploy on Zerops
You can either click the deploy button to deploy directly on Zerops, or manually copy the [import yaml](zerops.yml) to the import dialog in the Zerops app.
[](https://app.zerops.io/recipe/elixir)
## Recipe features
- **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**
## Project Structure
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 entry
- `GET /status` - Health check endpoint
- `/live` - LiveView routes
## Production vs. Development
Base of the recipe is ready for production. For production deployment, consider:
- Using highly available version of the PostgreSQL database (change `mode` from `NON_HA` to `HA` 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](https://discord.com/invite/WDvCZ54).