Phoenix and Elixir
Deploy Phoenix with Postgres, ClickHouse or Redis, Oban workers and migrations through the release.
Step by step: Deploy Phoenix to DigitalOcean · Deploy Phoenix to Hetzner · Deploy Phoenix to Vultr · Deploy Phoenix to OVHcloud · Deploy Phoenix to Scaleway · Deploy Phoenix to UpCloud
- Datastores from
mix.exs:ecto_sql/postgrex→ Postgres,ecto_ch/ch→ ClickHouse,redix→ Redis. - Migrations:
mix ecto.migrate. Compiled releases have nomixat runtime, so Railyard finds the release wherever the image puts it and runs its migrator (bin/migrateif present, otherwisebin/<app> eval).mix phx.serverbecomesbin/<app> startthe same way. - Variables read in
config/runtime.exs(BASE_URL,HTTP_PORT,LISTEN_IP,DATABASE_URL,CLICKHOUSE_DATABASE_URL…) are wired automatically;SECRET_KEY_BASEis generated. MIX_ENV=prodandPHX_SERVER=trueare set.
Background jobs usually need no second process
Most Elixir apps run jobs with Oban — a Postgres-backed queue started from the same supervision tree as the web endpoint, so it’s already running the moment web boots, with no separate worker to declare or scale. That’s still the 12-factor model: the job runner is just one of the roles your single OTP release already plays, not a second deployable to keep in sync with the first.
If you do want a dedicated worker node — splitting job processing onto its own process so a slow queue can’t starve web requests — declare it in a Procfile and have your release read a flag or env var to skip starting the endpoint:
web: bin/my_app start
worker: bin/my_app eval "MyApp.Release.worker()"
Add or edit processes from the app’s Workers tab without a repo change, and scale either from the CLI:
railyard scale my-app worker=2
Config and secrets
Everything config/runtime.exs reads with System.get_env/2 is a plain var: set it under Variables, or railyard env:set my-app KEY=VALUE from the CLI, and the same compiled release runs unchanged from staging through production — dev/prod parity, not a different build per environment. Point at a database, ClickHouse or Redis running as its own service on the canvas with ${{redis.RAILYARD_PRIVATE_URL}} — resolved per environment. See Variables and secrets.
Deploy it
- From a repo: paste the Git URL, or pick it from the picker once GitHub is connected — Railyard reads
mix.exs, fills inecto.migrate, the provisioned database andSECRET_KEY_BASE, and deploys on every push. - From the CLI:
railyard create my-app https://github.com/me/my-app --addons postgres, orrailyard git:remote && git push railyard mainfrom inside the repo. - One click: add the deploy button to your README, or publish to the template catalog so anyone can launch it with its addons and variables already filled in.