Elixir#
Elixir is detected if a mix.exs file is found.
Setup#
The following Elixir versions are available
latest(Default)1.171.161.151.141.131.121.111.101.9
The version can be overridden by
- Elixir version is extracted from the
mix.exsfile automatically - Setting the
NIXPACKS_ELIXIR_VERSIONenvironment variable - Setting the version in a
.elixir-versionfile
The OTP version is automatically set and cannot currently be customized.
The default install script is:
MIX_ENV=prod mix local.hex --force mix local.rebar --force mix deps.get --only prod
Build#
mix compile mix assets.deploy mix ecto.deploy # if available
If you are building outside of a live environment, you may want to omit ecto.deploy (which can sometimes rely on a database connection) which you can do by overriding the build command.
Start#
mix phx.server
Environment Variables#
The following environment variables are set by default:
MIX_ENV=prod ELIXIR_ERL_OPTIONS="+fnu"