deploy
Safe deployment workflow for Fly.io and infrastructure changes. Use before ANY deployment, config modification, or infrastructure change. Prevents panic-driven debugging and production incidents.
When & Why to Use This Skill
This Claude skill provides a rigorous and disciplined deployment workflow specifically optimized for Fly.io and infrastructure management. It enforces a 'local-first' testing philosophy and provides structured checklists to prevent production incidents, ensuring that every deployment is verified, documented, and reversible.
Use Cases
- Scenario 1: Executing safe Fly.io deployments by following a standardized pre-deployment checklist that includes local pipeline execution and import verification.
- Scenario 2: Managing infrastructure changes and environment secrets securely, including handling special characters via the Fly.io dashboard to prevent shell escaping errors.
- Scenario 3: Implementing rapid incident response and service recovery using structured rollback commands and release history tracking when production issues occur.
- Scenario 4: Standardizing team deployment discipline by enforcing 'one change at a time' and 'understand before fixing' protocols to minimize downtime and debugging panic.
| name | deploy |
|---|---|
| description | Safe deployment workflow for Fly.io and infrastructure changes. Use before ANY deployment, config modification, or infrastructure change. Prevents panic-driven debugging and production incidents. |
Deployment Discipline
The Golden Rules
- LOCAL FIRST, ALWAYS - Never deploy until local tests pass
- ONE CHANGE AT A TIME - Make one fix, test it, verify it works, then proceed
- UNDERSTAND BEFORE FIXING - Don't conflate unrelated errors
- NOTIFICATIONS ARE PRODUCTION - Failed deployments spam Slack
Pre-Deployment Checklist
Before ANY deployment:
# 1. Test locally first
source .venv/bin/activate
python scripts/run_pipeline.py everflow
# 2. Check what changed
git diff
# 3. Verify no broken imports
python -c "from signalroom.workers.main import main; print('OK')"
Fly.io Deployment
# Deploy (builds and pushes)
fly deploy
# Check status
fly status
# View logs
fly logs
# Check secrets are set
fly secrets list
Known Working Configuration
Supabase Pooler (REQUIRED for Fly.io):
- Host:
aws-0-us-east-1.pooler.supabase.com - Port:
6543 - User:
postgres.{project_ref}(NOT justpostgres)
Temporal Cloud:
- Address:
ap-northeast-1.aws.api.temporal.io:7233 - Namespace:
signalroom-713.nzg5u
If Something Breaks
STOP. Do not deploy again.
- Check what you changed:
git diff - Revert if needed:
git checkout -- <file> - Test locally before any retry
- Ask: "What was working before, and what did I change?"
Secrets with Special Characters
Passwords with backticks, quotes, or special chars:
- Do NOT use CLI - shell escaping will break them
- Use Fly.io dashboard - Settings > Secrets > Set manually
Rollback
# List recent deployments
fly releases
# Rollback to previous
fly deploy --image <previous-image>