Language Frankfurt, Germany
Deploy Elixir and Phoenix on Nodion
Nodion recognizes an Elixir app by its mix.exs. The Elixir buildpack fetches your dependencies, runs mix assets.deploy if your project defines it and builds a Mix release, which starts with PHX_SERVER=true. Erlang and Elixir stay out of the run image, and the app and its PostgreSQL database run in Frankfurt.
- Detected by
mix.exs- Start
bin/<app> startfrom the release- Elixir / OTP
- Elixir 1.16 to 1.20 (default 1.20), OTP 27 to 29 (default 28)
- Region
- EU Central (Frankfurt)
Deploy Elixir and Phoenix step by step
- Generate the release files Nodion builds your app with
mix release. In a Phoenix project,mix phx.gen.releaseadds what you need for that: aReleasemodule with amigratefunction and the scriptsbin/serverandbin/migrate. Commit the generated files.mix phx.gen.release - Read the config at runtime and listen on IPv4 A project from
mix phx.newalready has aconfig/runtime.exsthat readsPORT,SECRET_KEY_BASE,DATABASE_URLandPHX_HOSTin production. Nodion's app instances use IPv4, so set the endpoint'sipto{0, 0, 0, 0}: config/runtime.exsconfig :my_app, MyAppWeb.Endpoint, url: [host: host, port: 443, scheme: "https"], http: [ip: {0, 0, 0, 0}, port: port], secret_key_base: secret_key_base - Build assets without Node.js The Elixir build has no Node.js. Phoenix 1.7 and later use standalone esbuild and Tailwind binaries, and Nodion runs your
assets.deployalias during the build. If your asset pipeline calls npm, switch it to these tools or deploy with a Dockerfile. mix.exs"assets.deploy": [ "tailwind my_app --minify", "esbuild my_app --minify", "phx.digest" ] - Run migrations from the release Mix is not in the run image, so migrations run through the release, which Nodion builds into
/layers/nodion_elixir/release/release. Itsbin/migratescript from step 1 callsRelease.migrate. Arelease:line in a Procfile runs once per build before the new version starts; if it fails, the running version stays live. Procfilerelease: /layers/nodion_elixir/release/release/bin/migrate - Create the app, the database and the secrets Create an application from your GitHub, GitLab, Bitbucket or Gitea repository in the region EU Central and keep the build strategy on Buildpacks. Create a PostgreSQL database in the same region and attach it on the Environment tab: it arrives as
DATABASE_URLon the next deploy. AddSECRET_KEY_BASEfrommix phx.gen.secretas a secret and setPHX_HOSTto the domain your users open.PORTis set by Nodion.
Good to know
- Pin Elixir and ErlangNodion reads
elixiranderlangfrom.tool-versions, Elixir also from.elixir-version. Theelixir:requirement inmix.exsis a range and pins nothing. Without a pin you get Elixir 1.20 on OTP 28. - Start command and health checkNodion starts
bin/<app> startfrom the release, with the app name frommix.exs, and setsPHX_SERVER=trueso the endpoint serves HTTP. Traffic moves once/answers with 2xx or 3xx; if/needs a login, set another health check path in the app settings.
What Nodion runs for you
- Deploys without downtime Push to your branch and Nodion builds a new release. Traffic switches once the new instances answer their health check; a failed release leaves the running one in place. Apps with a local volume restart instead, because the disk belongs to one instance.
- Databases next to the app Managed PostgreSQL, pgvector, MySQL, Valkey and ClickHouse in the same region. Attached databases arrive as
DATABASE_URL,REDIS_URLorCLICKHOUSE_URL. - Previews per pull request Turn on previews and pull requests from your repository get their own app with its own URL and fresh, empty databases, created automatically or by hand. Forks and bot pull requests are skipped.
- Workers, cron jobs and scaling Run workers as extra processes of the same app, schedule jobs on the Cron tab, and scale every process to up to 16 instances.
- Release step With buildpacks, a Procfile
release:line runs with every new build. Dockerfile apps, and redeploys or rollbacks to an earlier image, use a release command set on the app itself, which also takes precedence over the Procfile line. On static sites a release step runs in an image that holds only the built files. - Logs and metrics Build, release and runtime logs plus CPU, memory, disk and network metrics for every instance in the dashboard.
- Domains and HTTPS A default hostname with HTTPS from the first deploy; your own domains get certificates automatically.
Further reading
- Dockerfile vs Buildpacks: Which One Should You Use? Both turn your code into a container image. What differs is who writes the build steps, and that decides control, maintenance and security updates.
- Cloud Native Buildpacks Explained Buildpacks turn your source code into a container image without a Dockerfile. What they are, and how they work.
Elixir and Phoenix on Nodion: questions and answers
Do I need a Dockerfile for Phoenix?
No. The Elixir buildpack builds a Mix release from mix.exs, as long as your assets build without Node.js. If your repository has a Dockerfile, the create form picks that strategy and Nodion builds the Dockerfile instead.
How do I run Ecto migrations?
Through the release: generate the Release module with mix phx.gen.release and add release: /layers/nodion_elixir/release/release/bin/migrate to a Procfile. It runs once per build before the new version starts, and a failure stops the deploy.
Which Elixir and Erlang/OTP versions are available?
Elixir 1.16 to 1.20 and Erlang/OTP 27 to 29. Without a pin, Nodion builds with Elixir 1.20 on OTP 28; pin both in .tool-versions. Only the build uses Erlang and Elixir, because the release brings its own runtime.
Where does my Elixir and Phoenix app run?
In the EU Central region in Frankfurt, Germany. Build, registry, the app and its databases, volumes, buckets, logs and metrics stay in that region, and Nodion's API and control plane are hosted in Germany. Nodion GmbH is based in Stuttgart.
Can I use Elixir and Phoenix in line with the GDPR?
Nodion provides the basis for it: Nodion GmbH is based in Stuttgart, Germany, in the Frankfurt region the app, its databases and volumes run in Germany, and you conclude the data processing agreement (DPA) under Art. 28 GDPR electronically in the dashboard. Whether your setup complies also depends on how you configure and use the app.
How much does it cost to run Elixir and Phoenix on Nodion?
An app instance starts at 1 EUR per month. The setup in the cost box costs 3.50 EUR per month: App 2 EUR, PostgreSQL 1.50 EUR. Prices are net and billed per second, and you pick bigger sizes or more instances whenever you need them.
Can I use my own domain for my Elixir and Phoenix app?
Yes. Every app gets a default hostname with HTTPS. Add your own domain on the app's Domains tab; the TLS certificate is issued and renewed automatically.