As I understand it,
mix release gives me:
- a transportable release package (at least among the same OS).
- the ability to hot-reload production releases.
Is there any advantage to using it compared to
MIX_ENV=prod mix phx.server, if you’re deploying with Docker?
Why would I want to combine both?
- already gives you a (even more?) transportable package, and you’re stuffing the release inside this anyway.
- can’t really support hot-reloading in a container (at least, not in a way that doesn’t throw out why you’re using docker in the first place).
I guess it maybe protects you from having code changed in the image, recompiled and executed, either nefariously or by accident?
I assume there isn’t any real performance difference, outside of maybe a fractionally faster initial load (because it’s already compiled into beam code?)
I could understand “it gives me a nice clean directory structure and feels nice” as being reason enough, or maybe “it lets me be prepared for non-docker deploys if I ever want to”?