Skip to main content
PercherPercher

Deploy guide · runtime = "docker"

Deploy Phoenix (Elixir) on Percher

Phoenix is Elixir's web framework — channels, LiveView, contexts, and a fast runtime built on the BEAM. The Percher template ships a minimal Plug + Bandit app; upgrade to full Phoenix by running `mix phx.new .` in the project directory.

Why Percher fits

  • BEAM's lightweight processes mean a single container handles thousands of concurrent connections — well-suited to Percher's single-container-per-app model.
  • LiveView's WebSocket-driven UI works over Percher's Caddy proxy — WebSocket upgrade headers are preserved.

Quick start

bunx percher create my-app --template phoenix
cd my-app
bunx percher publish

The first command scaffolds a working Phoenix (Elixir) project plus a `percher.toml`. Publish builds and deploys it; the live URL prints on completion.

percher.toml

The canonical config for a Phoenix (Elixir) app on Percher. `bunx percher init` generates this automatically when it detects Phoenix (Elixir) in your project.

[app]
name = "my-app"
runtime = "docker"
framework = "phoenix"

[web]
port = 8080
health = "/"

Common gotchas

  • Percher doesn't provision a managed Postgres today. Use an external provider (Neon/Supabase/your own) and set `DATABASE_URL` via `bunx percher env set`; Ecto picks up the standard Postgres URL.
  • Build a release with `mix release` and run that, not `mix phx.server` — releases are self-contained and don't need Mix at runtime.
  • Set `PHX_HOST` to your `*.percher.run` (or custom) domain — Phoenix uses it for URL generation and WebSocket origin checks.
  • `SECRET_KEY_BASE` is required for releases; generate with `mix phx.gen.secret` and set via `bunx percher env set`.

Related docs

Ready to deploy Phoenix (Elixir)?

Free plan, no credit card. Live in under a minute.

Sign up free

← Browse all deploy guides