Virtualization for Phoenix

Docker is not virtualisation

I cannot express that more. Containerisation (creating separate process namespaces within one system) is not the same as virtualisation (abstracting hardware for running different OS).


As for me, the Docker and containers aren’t really needed that much in Erlang/Elixir deployments. You can achieve simpler and easier to manage deployment via UNIX VMs (Linux/BDS, doesn’t really matter) with proper usage of init system (runit, OpenRC, systemd, SysV, launchd, whatever). Just build release using mix release and then run it on target machine using proper init file. If you want to have auto scaling or automatic healing, then use AWS ASG or similar solution from your cloud provider, and it will be much easier, with less indirection and (mostly needless) abstraction. Especially with systemd you can achieve almost all of that with proper set of options.

9 Likes