Deploying Rails on Docker: Kamal Alternative
32 points
14 days ago
| 8 comments
| impactahead.com
| HN
thih9
14 days ago
[-]
Looks like dokku is also a MIT Licensed open source project[1]. Note that there is also Dokku Pro[2], one time purchase during beta, offering UI and API.

[1]: https://github.com/dokku/dokku/

[2]: https://pro.dokku.com/

reply
pgm8705
14 days ago
[-]
I've tried several times to migrate a few apps I have from Dokku to Kamal because I've been intrigued by all the hype in the Rails community about it, but I've always given up after an hour or so of unsuccessful tinkering around. Maybe it is just because it's what I'm used to, but the Dokku experience is so much better than Kamal.
reply
dewey
14 days ago
[-]
Kamal also only recently became interesting after they added the feature where you can host multiple apps on the same server.
reply
ydnaclementine
14 days ago
[-]
Exactly. But I'd love to hear what the next step after dokku is. But maybe it's just moving the db to another, separate vps, and spinning up more instances of the service all pointing at that db instance, with all of that using dokku.
reply
pgm8705
14 days ago
[-]
I'm of the opinion that a single VPS can take you a very long way. Once you get to the point where you've outgrown that model, you're likely making enough money where something like Digital Ocean App Platform, as another commenter suggested, would be money well spent.
reply
spiffytech
14 days ago
[-]
One option is that Dokku can orchestrate k3s and Nomad. I don't know how well it works, but it sounds like it gives you the same simple ops interface with a clear incremental migration path to horizontal scaling.
reply
dbishai
14 days ago
[-]
I’ve had pretty good experience with Digital Ocean’s App Platform. That’s how I’m hosting https://blogmate.io, a side project of mine.
reply
claudiug
14 days ago
[-]
I use dokky for years, and now kamal. kamal is better for my, better documentation, i like the declarative way of setup my machines.
reply
0xbadcafebee
14 days ago
[-]
Dokku's design is a little weird. Overcomplicated shell scripts and Go, with a weird command-line argument format. It's not apparent that this is simpler than Docker Swarm, or just plain Docker Compose. But I guess it adds more features.

It feels like a set of canned Docker Compose configs would do the same. If Docker would add a layer of abstraction on top of Compose, and a marketplace of shareable configurations, I bet that'd provide the same functionality as Dokku.

reply
mooktakim
12 days ago
[-]
The missing feature is the ability to run on multiple servers. I want to be able to put it behind a load balancer. Kamal also has a huge issue where you can't set the "default host". This means load balancers can't work as "/up" never succeeds. I created an issue on github but the big honcho closed it without reading lol I understand the idea behind single server, but realistically you need at least two app servers to switch over when needed.
reply
chris12321
11 days ago
[-]
I know of a bunch of apps that deploy to multiple servers behind a load balancer using Kamal. Here's an article explaining the process https://guillaumebriday.fr/how-to-deploy-and-scale-your-rail...
reply
mooktakim
11 days ago
[-]
The article only talking about single app per server without using hostnames. That you can do as the app will respond to the IP address. Currently you can't run multiple apps on each servers behind load balancer as the health check will not be successful as there is no way to set the default host.
reply
devops000
14 days ago
[-]
I use Cloud66 to deploy and it is very easy
reply
TheTaytay
14 days ago
[-]
We have been hosting on Heroku for 10 years or so, and have been happy doing so. Recently I needed to deploy some backend docker containers that _also_ need to have access to docker so that they can spin up their _own_ docker containers. Most PaaS don't give you access to docker-in-docker (and rightly so), but I love the abstractions that Heroku (12-factor apps) have.

Spinning up a VPS on DigitalOcean or Hetzner is not a problem of course, and running the containers is trivial, but when it comes to "productionizing" this (auto-deployment from branches, infrastructure as code, Github Actions, secure secrets, centralized logging, load balancing, and the other niceties that you get with a PaaS), there are a LOT of options.

From my research, it looks like "Host your own Heroku" options include: Dokku, Porter.run, Kamal, Coolify, Dokploy, CapRover, Cloud66, and some wrappers of K8s or K3s.

I admire what Kamal/DHH is trying to do in this space, but I keep coming across people saying, "It was close, but boy I had a hard time getting it working," and they also decided to write their own web proxy recently which really read like the most Not-invented-here thing ever. Still, I admire their pursuit of simplicity!

Rightly or wrongly, K8s (even K3s) always reads as complicated to me, even if I am not hosting it. It feels like a combination of "I hope you like yaml" and "And now you have two problems" sorts of tools...

I like the effort that Coolify, Dokploy, and CapRover put into the GUI wrappers, but as those get thicker, my fear of something going wrong also increases. (I did have a good experience installing Coolify on a couple of Hetzner servers, but I haven't used it in earnest).

I lean towards Dokku for its deliberate attempt to replicate Heroku abstractions, and its age, but I'd love to hear others' experience with Dokku or similar tools, especially in a "real world" setting.

reply
rednafi
14 days ago
[-]
K8s/k3s doesn’t solve my problem either, and I don’t want to manage that in my personal workflow. Coolify is pretty neat, and so is Kamal. My Python script that SSHs into a machine and runs a few Docker commands also works.
reply
knowsuchagency
14 days ago
[-]
Nothing touches https://dokploy.com
reply
ofrzeta
14 days ago
[-]
Obligatory mention of Dokku alternatives: Caprover, Coolify.
reply