Deploy Phoenix to DigitalOcean
Run your Phoenix app on a DigitalOcean server in your own account, with Postgres, HTTPS and zero-downtime releases. DigitalOcean bills you for the server directly, and Railyard adds no markup.
Steps
- 1
Create a DigitalOcean API token
In the DigitalOcean control panel, open API and generate a personal access token with read and write access. Paste it into Railyard and tick Save it to the team, so it's reused for every server after this one.
- 2
Add a DigitalOcean server
In Railyard, open Servers, then Add a server, then Create on your cloud, and pick DigitalOcean, a region and a size. Railyard preselects s-1vcpu-2gb (1 vCPU, 2 GB of memory). It creates the server in your DigitalOcean account and installs Docker, Caddy and its agent in about two minutes.
- 3
Deploy your Phoenix repository
Paste the GitHub link. Railyard reads the repository, detects Phoenix and fills in the build, the port, the release command, workers and Postgres.
- 4
Go live on HTTPS
Railyard builds on a separate build server, runs the release command, health-checks the new version and moves traffic only when it answers. Add your domain and the certificate is issued and renewed for you.
What Railyard sets up for Phoenix
- ecto_sql or postgrex becomes Postgres, redix becomes Redis, and ecto_ch becomes ClickHouse.
- Migrations run through the compiled release, so no mix is needed at runtime.
- Variables read in config/runtime.exs are wired for you.
- SECRET_KEY_BASE is generated, and MIX_ENV and PHX_SERVER are set.
- mix phx.server becomes the release's start command.
DigitalOcean regions
Toronto keeps your data in Canada. Frankfurt and Amsterdam keep it in the EU.
- New York
- San Francisco
- Amsterdam
- Frankfurt
- London
- Toronto
- Singapore
- Bangalore
- Sydney
Questions
Which DigitalOcean server size should I start with?
Where does my Phoenix app's data live?
What does it cost to run Phoenix on DigitalOcean?
Phoenix on other clouds
Deploy Phoenix to your own DigitalOcean server.
No credit card. Your provider bills you for servers at its own price.
Free plan, no card, and 14 days of Pro for every new team. One flat price per team.