rails-deployment
Installation
SKILL.md
Rails Deployment
Kamal Essentials
- Use Kamal 2 for zero-downtime deployments to VPS/bare metal (default in Rails 8)
- Kamal Proxy fronts the app (replaces Traefik) — TLS via Let's Encrypt is built in
kamal deployfor production,kamal deploy -d stagingfor staging- Secrets live in
.kamal/secrets(env interpolation, not committed) - Pull the registry password from encrypted credentials so only
RAILS_MASTER_KEYis needed on the deployer:KAMAL_REGISTRY_PASSWORD=$(kamal secrets fetch --account myuser kamal/registry_password)orrails credentials:fetch kamal.registry_password(Rails 8.1) - Registry-free Kamal (2.8+) runs a local registry by default; remote still recommended at scale
- Clear env vars in
env.clear, secret refs inenv.secret
deploy.yml Structure
service: myapp
image: myapp