Elixir
Railpack builds and deploys Elixir and Phoenix applications with zero configuration.
Detection
Section titled “Detection”Your project will be detected as a Elixir application if a mix.exs file exists in the root directory.
Versions
Section titled “Versions”The Elixir version is determined in the following order:
- Any mise-supported version file (
mise.toml,.tool-versions, etc) - Set via the
.elixir-versionfile - Detected from the
mix.exsfile - Set via the
RAILPACK_ELIXIR_VERSIONenvironment variable - Defaults to
1.18
The OTP version is determined in the following order:
- Any mise-supported version file (
mise.toml,.tool-versions, etc) - Set via the
.erlang-versionfile - Detected automatically from the resolved Elixir version
- Set via the
RAILPACK_ERLANG_VERSIONenvironment variable - Defaults to
27.3
Configuration
Section titled “Configuration”Railpack builds your Elixir application based on your project structure. The build process:
- Installs Elixir and Erlang
- Gets and compiles dependencies using
mix deps.get --only prodandmix deps.compile - If defined, prepares assets using
mix assets.setup - If defined, deploys assets and ecto using
mix assets.deployandmix ecto.deploy - Compiles a release for the project using
mix compileandmix release - Sets up the start command from your release binary
The selected file will be run with /app/_build/prod/rel/{}/bin/{} start.
Config Variables
Section titled “Config Variables”| Variable | Description | Example |
|---|---|---|
RAILPACK_ELIXIR_VERSION | Override the Elixir version | 1.18 |
RAILPACK_ERLANG_VERSION | Override the Erlang version | 27.3 |