Simplifying Hot-Upgrades for Elixir Applications
Jellyfish is a library designed to streamline the management of appup and release files, enabling hot-upgrades for Elixir applications. Born from the integration of concepts and functionalities from three influential repositories:
If available in Hex, the package can be installed
by adding jellyfish
to your list of dependencies in mix.exs
:
def deps do
[
{:jellyfish, "~> 0.1.4"}
]
end
You also need to add the following lines in the mix project
def project do
[
...
compilers: Mix.compilers() ++ [:gen_appup, :appup],
releases: [
your_app_name: [
steps: [:assemble, &Jellyfish.Releases.Copy.relfile/1, :tar]
]
],
...
]
end
Once the mix release file is generated, it will contain all the appup file to execute a hot-upgrade or full deployment.
If for any reason you need to change the order of the modules or add new commands in the appup file, you have 2 options:
- Use the EDIT_APPUP environment variable to indicate to Jellifish that you want to edit the file before the release:
EDIT_APPUP=true MIX_ENV=prod mix release
- Untar the release, do the changes in the appup files and tar it again.
The library focuses on generating appup files and includes them in the mix release package. It doesn't create relup files directly. The relup file is typically created during a hot upgrade with the Deployex application.
Explore Deployex, an Elixir application showcasing Jellyfish's capabilities in deployment with hot-upgrades.
🗨️ Contact us: Feel free to contact me on Linkedin.
Copyright (c) 2024, Thiago Esteves.
DeployEx source code is licensed under the MIT License.
Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/jellyfish.