I’m in the middle of trying to deploy a Phoenix app, and I’ve been rather surprised by how painful it is to run it without a load-balancer.
The main pain point for me at the moment is how there appears to be no facility to start the server (I use
mix release) as root to grab privileged ports and SSL certificates that only root should have access to, and then drop privileges to run as an unprivileged user.
Pretty much any other unixy server that uses certificates has this exact facility.
But here, it seems the only options open to me are:
- to run BEAM as root
- to use all sorts of tricks to disable the normal Linux security mechanisms protecting access to privileged ports and SSL certs
- run a loadbalancer (like Traefik) in front of Phoenix to handle all the security-sensitive parts
Did I miss something? I find it hard (and scary) to imagine that people are regularly using options 1 or 2.