Hi guys ![]()
I have a question about having “having multiple websites on one machine” (putting the topic very simply so I don’t inadvertently make confusion in my intent).
To provide some context: I’ve been happily working with Elixir/Phoenix for the past 4-5 years, doing some small jobs for my friends. I usually am on a very tight budget (my friends are cheapskates
), so I try to do everything on one very low-spec VPS (one per friend).
Sometimes it so happens that my friends want multiple public-facing sites. When I tried to run two separate Phoenix projects on the same machine, one appeared to be running out of memory, while the other hogged all the memory for itself.
I have solved this issue previously by making multiple Endpoints in one project on different ports and ran it behind Caddy.
That worked well, but now I am doing a little bit more complicated project, which requires 3(+) domains, different apps and a very low payload (per-app assets, layouts etc.). I’ve tried to tackle this, but honestly the project directory now appears to be a giant convoluted mess now, into which I detest delving back into.
Questions from a dilettante to pros like you:
- Is there a way to run multiple projects on one ((low-spec)) machine without running out of memory, i.e. without the
beam.smpprocesses fighting a last man standing type gladiator battle every time I try to start them? Honestly that would be the best solution, because it feels like I am fighting Phoenix at this point. - If not, is there a good way of structuring my project for separate web apps, so that its assets, generated assets (like .js, .css files) and Elixir code runs neatly in one node? I read about generating an
--umbrellaproject, but that didn’t seem to get me any further.
Thanks ![]()
C.






















