---
name: "rails-8-kamal-docker-deployment"
description: "Deploy modern Rails 8 applications to bare-metal servers or cloud VPS using Kamal and Docker."
metadata:
  author: "Ruby on Rails"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "deploy rails with kamal"
  - "configure config/deploy.yml kamal"
  - "zero downtime deploy kamal"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# Ruby on Rails 8 Kamal Zero-Downtime Docker Deployment

Configures Rails 8 with Kamal: writing config/deploy.yml, managing Docker image builds, zero-downtime rolling deploys via Traefik reverse proxy, accessory services (Postgres, Redis), and secret management.

## When to Invoke
Invoke this skill whenever you need to:
- deploy rails with kamal
- configure config/deploy.yml kamal
- zero downtime deploy kamal

## Execution SOP & Rules
1. Configure config/deploy.yml with service name, image repository, servers, and registry credentials.
2. Set up environment secrets using .kamal/secrets file.
3. Run initial server setup: kamal setup to install Docker and start Traefik proxy.
4. Execute ongoing deployments: kamal deploy and monitor live output logs: kamal app logs -f.

## Verification Checklist
- Run local linting, syntax validation, and type-checks before reporting completion.
- Ensure all created or modified files adhere to workspace boundaries and avoid uncommitted secrets.
- Verify tests or build commands exit cleanly with return code 0.
