I’ve been playing around with Kamal from Basecamp (previously called MRSK) for deploying simple apps on a single server.
There’s a lot to like about Kamal’s ergonomics and principles. But there were a few things that I struggled with or that confused me.
It mostly boils down to Kamal offering some kind of a layer of abstraction over docker, SSH and some linux commands. But perhaps more importantly, DHH, the creator of Kamal quite explicitly says that:
“[It] is designed for multi-server operation”.
DHH
Why is this distinction important?
Because it implicitly avoids some of the nice (and more secure) features of docker on a single host, primarily: internal network connections and name resolution.
[It] is designed for multi-server operation, so the internal network idea breaks down pretty quick with that. You’d have to unstrip all of that when you go to scale it. So I think we’re better off keeping the network host transparent.
DHH
This is a completely fair design choice, and simplifies a lot of complexity for Kamal. However, when you’re running your new startup or a hobby project, you want to keep things simple and run it all on one host.
But you don’t want to compromise on security and unintentionally expose your Database or Redis to the outside world, right?