For deployment we will use distillery. It builds releases of your mix projects.

Open up our mix.exs file.

Let’s add the follwing dependency.

defp deps do [ {:distillery, “~> 1.4”}, ] end

Our dependencies should now look like this -

 defp deps do
      {:cowboy, "~> 1.1"},
      {:plug, "~> 1.3"},
      {:distillery, "~> 1.4"}

We’ll run our mix deps.get command to retrieve our dependencies.

Configure Distillery

To configure distillery we’ll run the following command -

mix release.init