📎 Webclip
Deploying Elixir applications with Edeliver
Edeliver is presented as a way to make Elixir release and deploy work more manageable. The post says it builds and deploys through bash scripts, can distribute releases across multiple servers, and can be used with custom hooks for Phoenix asset tasks.
Reading notes#
- Edeliver is introduced as a tool for building and deploying Elixir and Erlang applications and for performing hot-code upgrades.
- The author says the manual deploy process was repetitive, and a simple
script/deployusingmix edeliver build release,deploy release to production,start production, andmigrate production upreduced that work. - Edeliver runs Mix tasks that generate bash instructions; some commands run locally and then send remote instructions through RPC.
- The tool distinguishes build, staging, and production environments.
- The build environment must match the architecture of the server where the release will run, because Exrm builds with local NIFs and cross-compiling can fail.
- To configure environments, the project needs a
.deliver/configfile with build, staging, and production hosts, users, and deploy paths. - The configuration supports distributing releases across several servers.
- For Phoenix, the post says extra tasks are needed before the release is generated, especially
brunch build --productionandmix phoenix.digest. - These tasks can be added through a hook in
.deliver/config, such aspre_erlang_clean_compile. - The sample hook installs npm dependencies, builds assets with Brunch, creates
priv/static, and runsphoenix.digeston the build host. - The post notes that the earlier Exrm approach for environment variables still matters, but
RELX_REPLACE_OS_VARS=truecannot be set the same way because Edeliver’s start task runs locally. - One suggested fix is to export
RELX_REPLACE_OS_VARSin production. - The conclusion is that Edeliver is an easy-to-use option, but readers should consult its README and docs for implementation details.
