I have been running Dokku on a hetzner VPS for a couple of years for several architectural spikes, one phoenix. Once it was set up I found it easy to maintain (but I adopted containers before docker, YMMV). Set up involved a bit of trial and Error.
What I like about Dokku is that it makes it very easy to gradually develop and launch. Eg start new site, add letsencrypt for it, start developing without login, just add dokku basic auth, see if the idea works and then later add logins, access control etc. And I get effortless remote private git repositories for every experiment.
Possible downside is that you need a bigger vps than for just hosting, since dokku also builds before running (mine was already oversized because of a haskell deployment, I donāt know if this is an issue with elixir). It can also pull images, but I quite like the tight push-build-deploy flow.
I was not aware of coolify. Might look into it to see how it compares.
(And nice to see @artem around, I believe we met eons ago at a conference in Helsinki).
Iāve been increasingly looking to Livebook apps for this exact use case! Just set up a single Livebook instance on your favourite hosting provider, develop your app using Kino, or PhoenixPlayground, hit āDeployā and enjoy!
The biggest drawbacks right now are that you canāt host anything at the root path (everything is nested under ā/appsā), you donāt get domain-based routing, and you canāt easily design the homepage without running your own fork of Liveview.
Even so, the freedom to just jump into a Livebook, code something up and deploy it in minutes, at zero additional cost is beyond cool!
Also, with Livebook teams, you can actually have separate environments eg dev/staging/prod without compromising the workflow.
As an example, Iāve set this up on https://speedrun.dev . No apps deployed right now, but you get the gist
I used watchtower and site encrypt on a VPS before I decided to just use Fly.io but if the cost savings were worth it to me I would totally go back to a VPS because it worked very well.
One way to limit the cost on Fly.io is to have a shared Postgres on Fly.
The thing that they mention to not use it in production and instead reach for k8s is very questionable honestly, this might point to potential issues with the technology.
From what is written in readme, it seems that the old container is stopped and the new one is started. This is not ideal, but for a project where you can afford downtime and donāt update often, this should be good enough.
I have a small second hand computer in my electrical cupboard that I deploy OCI containers to using a small shell script, podman, and systemd. Itās great!
Iām using a mix of Kamal and Dokku. Iām transitioning more to Kamal since I like itās architectural design more (Dokku insists on owning more of the host).
This is self-hosted on my rack of servers.
Kamal + Phoenix worked right out of the box. I only had to adjust nginx once I put nginx in front of Kamal (for wildcard SSL certs).
I found Elixir/Phoenix to be reasonably conservative on RAM, with my latest app consuming ~ 150MB.
Thanks a lot for so many great answers! I donāt dare to mark any of them as a solution, because all these options are. Will be studying what works best for my case and maybe then post here what worked.
I have a non-standard deployment that works well for my needs. I run a Nerves instance on https://www.vultr.com by using nerves_system_vultr. It costs me $5/mo. I have an SQLite db I keep on the same host.
I use it to run DepViz and a few other tiny sites. If youāre interested in how it works you can find the code on GitHub: GitHub - axelson/vps.
For me the biggest downsides for hosting web apps in this way is that all the dependencies have to be in sync and itās hard to add external dependencies (since thereās no apt get install).