kamal
Deploy Rails apps with Kamal. Use when setting up Kamal, configuring deploy.yml, managing secrets, or running deploy/rollback commands.
When & Why to Use This Skill
This Claude skill facilitates seamless Ruby on Rails application deployment using Kamal. It helps developers automate the entire deployment lifecycle—from initial server provisioning and deploy.yml configuration to secure secrets management and zero-downtime rollbacks—ensuring a reliable, repeatable, and containerized DevOps workflow.
Use Cases
- Initial Server Setup: Use the skill to guide the 'kamal setup' process, ensuring all dependencies and server configurations are correctly initialized for a first-time deploy.
- Automated Deployment Workflows: Streamline routine application updates by generating the necessary commands for building, pushing, and pulling Docker images to production.
- Configuration Management: Get assistance in drafting and validating 'deploy.yml' files, including defining roles, accessories (like databases or Redis), and proxy settings.
- Secure Secrets Handling: Manage sensitive environment variables and Rails master keys securely using Kamal's secrets integration to prevent credential leaks.
- Rapid Incident Recovery: Execute fast rollbacks to previous stable versions during production outages to minimize downtime and user impact.
| name | kamal |
|---|---|
| description | Deploy Rails apps with Kamal. Use when setting up Kamal, configuring deploy.yml, managing secrets, or running deploy/rollback commands. |
| version | 1.0.0 |
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:
DATABASE_URL=postgres://...
RAILS_MASTER_KEY=...
Note: kamal config prints merged config including secrets.