In this recipe, we will be using exrm to assist us in the process of deploying applications and updating running systems without taking them down.
This is another key feature provided by Elixir: availability!
To get started, we need the application that we used in the previous recipe. You may find it under the release_me
folder in the code directory.
To deploy an application and update it while running, we will follow these steps:
Create a new location to deploy your application. In this case, we will be using the
tmp/elixir_app
directory:mkdir -p tmp/elixir_app
Copy the release generated in the previous recipe to the new location:
> cp rel/release_me/release_me-0.0.1.tar.gz tmp/elixir_app
Unpack it:
> cd tmp/elixir_app > tar -xf release_me-0.0.1.tar.gz
Start your app by running the following command after going to the root directory of your application, that is, the rel/release_me folder:
> bin/release_me...