A release is a self-contained deployment artifact for running an Elixir system in production. It compiles the main OTP application and its dependencies, includes the Erlang runtime, and provides scripts for operating the resulting system. section 13.2.1 section 13.2.2
Build a release with Mix, then operate it through its generated command script:
- Run `mix release`; use `MIX_ENV=prod mix release` or configure the `release` task to prefer the production environment. section 13.2.1
- Copy `_build/prod/rel/todo` to a compatible machine without installing Elixir or Erlang separately. section 13.2.2
- Use the generated script to start the system, run it as a daemon, attach a remote shell, or stop it. section 13.2.2
- Set `RELEASE_NODE` when naming the running node; use `RELEASE_DISTRIBUTION=name` for long node names. section 13.2.2
A standalone release contains compiled OTP applications, runtime arguments, a boot script, application configuration, an operation script, and Erlang runtime binaries. Required direct and indirect dependencies, core OTP applications, Elixir, and IEx reside under the release’s `lib` directory. Project files can be bundled through a root `priv` folder. section 13.2.3
Starting and inspecting a production release
Run `RELEASE_NODE="todo@localhost" _build/prod/rel/todo/bin/todo start_iex` to start the to-do system with an IEx shell. From that shell, `:code.get_path()` shows paths resolving inside the release directory rather than the host installation. section 13.2.2 section 13.2.3
$ mix release * assembling todo-0.1.0 on MIX_ENV=dev * using config/runtime.exs to configure the release at runtime Release created at _build/dev/rel/todo ...
Shows the release command assembling an artifact and reporting its output directory. section 13.2.1



