Releasing with Distillery
So far, we have been running the application with mix
or mix phx.server
, and our code was being compiled on the fly before running. This way, only files changed after the last compilation are recompiled before running the application, contributing to a fast development experience.
Note
If you're inside an IEx shell (that is, you started the application with iex -S mix
), you can also call the recompile/0
function whenever you want to compile the changes you just made, instead of having to quit and start the application again. This only works if you're inside a Mix project.
Â
The code we're running is perfectly capable of performing its duties in production, but we don't want to deploy it like this. If we copy the umbrella project folder to production and then run it with mix phx.server
, we would also be deploying the development and test dependencies and the entire source code of the application, resulting in an inefficient and unsafe production environment.
Because of...