Rails 8, Kamal 2: Two Apps, One Host

Two Rails 8 apps. Deploying to a VPS on Hetzner.

If I deploy A first then B, A works and B does not. If I delete those deployments and redeploy B first then A, B works.

I can log into the container of the app that’s not working and see it using curl localhost:3000.

I’ve read the kamal docs and as many kamal deployment articles as I could find. From what I see it should “just work.” Each app has the proxy ssl set to true and the host set. From the two files …

proxy:
  ssl: true
  host: www.projectuseful.com

proxy:
  ssl: true
  host: www.dvrsly.com

I’m kind of out of ideas. Anyone have suggestions?

Thanks

I figured it out. There were some missing files related to kamal and rails 8’s way of doing things. There were also some old, very out of date configs that needed some updates. Anyhow it’s going now.

So, yes, you can have two (or three, I have three on the same vps now) apps in production.

Cheers

I wrote up a small listing of the changes to migrate from Rails 6 to Rails 8 and to change from deploying by hand to deploying through kamal. It’s mainly the files but listed some of the commands used in the upgrade. It’s probably missing a few steps but it’s what I can remember / find in my .zsh_history file. It’s at https://www.dvrsly.com/p/16

3 Likes