Skip to content

Latest commit

 

History

History
78 lines (54 loc) · 2.57 KB

README.md

File metadata and controls

78 lines (54 loc) · 2.57 KB

Jellyfish

Simplifying Hot-Upgrades for Elixir Applications

Hex.pm Version

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:

Installation

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.

Appup file

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:

  1. 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
  1. Untar the release, do the changes in the appup files and tar it again.

Relup file

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.

Examples

Explore Deployex, an Elixir application showcasing Jellyfish's capabilities in deployment with hot-upgrades.

Getting involved

🗨️ Contact us: Feel free to contact me on Linkedin.

Copyright and License

Copyright (c) 2024, Thiago Esteves.

DeployEx source code is licensed under the MIT License.

References

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/jellyfish.