Kamal
Use Kamal to deploy Rails applications with repeatable, safe workflows.
Install and Initialize
- •Install:
gem install kamal - •Initialize in app:
kamal init- •Creates
config/deploy.ymland.kamal/secrets
- •Creates
Deploy Workflow
- •Run
kamal setupfor first deploys or new servers. - •Use
kamal deployfor routine releases. - •Use
kamal rollback [VERSION]for fast recovery.
Common Commands
- •Help:
kamal --help - •Show merged config:
kamal config - •Deploy:
kamal deploy - •Redeploy without bootstrap:
kamal redeploy - •Rollback:
kamal rollback [VERSION] - •Remove app/proxy/accessories:
kamal remove - •Cleanup:
kamal prune - •Manage app:
kamal app(seekamal app --help) - •Manage accessories:
kamal accessory(seekamal accessory --help) - •Manage proxy:
kamal proxy - •Server bootstrap only:
kamal server
Secrets
- •Keep secrets in
.kamal/secretsor environment variables. - •Example entries in
.kamal/secrets:
code
DATABASE_URL=postgres://... RAILS_MASTER_KEY=...
Note: kamal config prints merged config including secrets.