
When running an Elixir application in production, using Elixir Releases is the preferred approach.
While mix phx.server
is useful for development, it depends on Mix, which is not included in releases.
Why Use Elixir Releases?
Releases bundle only the necessary runtime components, making deployments more efficient.
Releases start quicker, which can be crucial for application leveraging FLAME operations.
Unlike Mix-based deployments, releases do not include Mix, reducing dependencies and improving security.
Common Mix Commands & Their Alternatives
Since Mix is unavailable in production, you’ll need alternatives for common tasks:
Running Migrations
Instead of mix ecto.migrate
, use:
gigalixir ps:migrate
Starting a Remote Console
Instead of iex -S mix
, use:
gigalixir ps:remote_console
But I absolutely need it!
Mix mode may be useful if you rely on runtime dependencies that require Mix, such as certain debugging tools or development workflows. Gigalixir supports both Elixir Releases and Mix Mode.
The gigalixir-24 stack will default to Elixir Releases for the build process. We need to tell Gigalixir to use Mix instead.
mkdir -p .gigalixir
touch .gigalixir/mix
git add .gigalixir/mix
git commit -m "use a mix build"
For stacks prior to gigalixir-24, mix mode is the default.
Elixir Releases are only activated if you have a config/releases.exs
file.
Need help?
If you need additional help please reach out to our support team.