u/HammerSpb

Built a Rails 8 + Kamal 2 starter template — what would you add/change/remove?
▲ 13 r/rubyonrails+1 crossposts

Built a Rails 8 + Kamal 2 starter template — what would you add/change/remove?

I put together a Rails 8 boilerplate and I'd love feedback from people who actually run Rails in production.

The repo: https://github.com/HammerSpb/rails-template

What it is: a Rails 8 template with two fully Dockerized environments (production + staging) deployed via Kamal 2.

The one non-obvious design choice: instead of needing a remote VPS to try the deploy flow, it ships a kamal-host container - an Ubuntu box with sshd + docker CLI that acts as Kamal's Linux deploy target locally. Kamal SSHes into it and runs containers on your host's Docker daemon via a mounted socket. The point is that the exact same kamal deploy workflow moves untouched to a real VPS later - you just change the host/port/user.

What's in the box:

  • Rails 8 with Solid Queue / Cache / Cable (Postgres-backed, no Redis)
  • PostgreSQL 16 as a Kamal accessory, one container per environment
  • Dockerized dev DB + a local Docker registry
  • JSON structured logging, a /up health dashboard, mkcert TLS helper
  • One-command Postgres backups, a Makefile of deploy/log/backup aliases
  • RuboCop, ERB Lint, Brakeman, bundler-audit, GitHub Actions CI preconfigured

What I'm asking:

  1. What's missing that you'd consider non-negotiable for a new Rails app?
  2. Anything here you'd remove as over-engineering or a bad default?
  3. Is the local kamal-host container a useful idea, or am I solving a problem that doesn't need solving?
  4. Better conventions for anything you spot?

Happy to take blunt feedback - the goal is something genuinely useful, not just my own preferences.

u/HammerSpb — 3 days ago