Deployment Procedures
💡 MCP Tool Available: Use Context7, Tavily, BraveSearch, or Serper.dev first; only if those fail, use WebSearch or WebFetch as needed.
Deployment principles and decision-making for safe production releases.
Learn to THINK, not memorize scripts.
⚠️ How to Use This Skill
This skill teaches deployment principles, not bash scripts to copy.
- Every deployment is unique
- Understand the WHY behind each step
- Adapt procedures to your platform
1. Platform Selection
Decision Tree
What are you deploying?
│
├── Static site / JAMstack
│ └── Vercel, Netlify, Cloudflare Pages
│
├── Simple web app
│ ├── Managed → Railway, Render, Fly.io
│ └── Control → VPS + PM2/Docker
│
├── Microservices
│ └── Container orchestration
│
└── Serverless
└── Edge functions, Lambda
Each Platform Has Different Procedures
| Platform |
Deployment Method |
| Vercel/Netlify |
Git push, auto-deploy |
| Railway/Render |
Git push or CLI |
| VPS + PM2 |
SSH + manual steps |
| Docker |
Image push + orchestration |
| Kubernetes |
kubectl apply |
2. Pre-Deployment Principles
The 4 Verification Categories
| Category |
What to Check |
| Code Quality |
Tests passing, linting clean, reviewed |
| Build |
Production build works, no warnings |
| Environment |
Env vars set, secrets current |
| Safety |
Backup done, rollback plan ready |
Pre-Deployment Checklist
3. Deployment Workflow Principles
The 5-Phase Process
1. PREPARE
└── Verify code, build, env vars
2. BACKUP
└── Save current state before changing
3. DEPLOY
└── Execute with monitoring open
4. VERIFY
└── Health check, logs, key flows
5. CONFIRM or ROLLBACK
└── All good? Confirm. Issues? Rollback.
Phase Principles
| Phase |
Principle |
| Prepare |
Never deploy untested code |
| Backup |
Can't rollback without backup |
| Deploy |
Watch it happen, don't walk away |
| Verify |
Trust but verify |
| Confirm |
Have rollback trigger ready |
4. Post-Deployment Verification
What to Verify
| Check |
Why |
| Health endpoint |
Service is running |
| Error logs |
No new errors |
| Key user flows |
Critical features work |
| Performance |
Response times acceptable |
Verification Window
- First 5 minutes: Active monitoring
- 15 minutes: Confirm stable
- 1 hour: Final verification
- Next day: Review metrics
5. Rollback Principles
When to Rollback
| Symptom |
Action |
| Service down |
Rollback immediately |
| Critical errors |
Rollback |
| Performance >50% degraded |
Consider rollback |
| Minor issues |
Fix forward if quick |
Rollback Strategy by Platform
| Platform |
Rollback Method |
| Vercel/Netlify |
Redeploy previous commit |
| Railway/Render |
Rollback in dashboard |
| VPS + PM2 |
Restore backup, restart |
| Docker |
Previous image tag |
| K8s |
kubectl rollout undo |
Rollback Principles
- Speed over perfection: Rollback first, debug later
- Don't compound errors: One rollback, not multiple changes
- Communicate: Tell team what happened
- Post-mortem: Understand why after stable
6. Zero-Downtime Deployment
Strategies
| Strategy |
How It Works |
| Rolling |
Replace instances one by one |
| Blue-Green |
Switch traffic between environments |
| Canary |
Gradual traffic shift |
Selection Principles
| Scenario |
Strategy |
| Standard release |
Rolling |
| High-risk change |
Blue-green (easy rollback) |
| Need validation |
Canary (test with real traffic) |
7. Emergency Procedures
Service Down Priority
- Assess: What's the symptom?
- Quick fix: Restart if unclear
- Rollback: If restart doesn't help
- Investigate: After stable
Investigation Order
| Check |
Common Issues |
| Logs |
Errors, exceptions |
| Resources |
Disk full, memory |
| Network |
DNS, firewall |
| Dependencies |
Database, APIs |
8. Anti-Patterns
| ❌ Don't |
✅ Do |
| Deploy on Friday |
Deploy early in week |
| Rush deployment |
Follow the process |
| Skip staging |
Always test first |
| Deploy without backup |
Backup before deploy |
| Walk away after deploy |
Monitor for 15+ min |
| Multiple changes at once |
One change at a time |
9. Decision Checklist
Before deploying:
10. Best Practices
- Small, frequent deploys over big releases
- Feature flags for risky changes
- Automate repetitive steps
- Document every deployment
- Review what went wrong after issues
- Test rollback before you need it
Remember: Every deployment is a risk. Minimize risk through preparation, not speed.
1---2name: deployment-procedures3description: Production deployment principles and decision-making. Safe deployment workflows, rollback strategies, and verification. Teaches thinking, not scripts.4---56# Deployment Procedures78> **💡 MCP Tool Available**: Use **Context7**, **Tavily**, **BraveSearch**, or **Serper.dev** first; only if those fail, use **WebSearch** or **WebFetch** as needed.910> Deployment principles and decision-making for safe production releases.11> **Learn to THINK, not memorize scripts.**1213---1415## ⚠️ How to Use This Skill1617This skill teaches **deployment principles**, not bash scripts to copy.1819- Every deployment is unique20- Understand the WHY behind each step21- Adapt procedures to your platform2223---2425## 1. Platform Selection2627### Decision Tree2829```30What are you deploying?31│32├── Static site / JAMstack33│ └── Vercel, Netlify, Cloudflare Pages34│35├── Simple web app36│ ├── Managed → Railway, Render, Fly.io37│ └── Control → VPS + PM2/Docker38│39├── Microservices40│ └── Container orchestration41│42└── Serverless43 └── Edge functions, Lambda44```4546### Each Platform Has Different Procedures4748| Platform | Deployment Method |49|----------|------------------|50| **Vercel/Netlify** | Git push, auto-deploy |51| **Railway/Render** | Git push or CLI |52| **VPS + PM2** | SSH + manual steps |53| **Docker** | Image push + orchestration |54| **Kubernetes** | kubectl apply |5556---5758## 2. Pre-Deployment Principles5960### The 4 Verification Categories6162| Category | What to Check |63|----------|--------------|64| **Code Quality** | Tests passing, linting clean, reviewed |65| **Build** | Production build works, no warnings |66| **Environment** | Env vars set, secrets current |67| **Safety** | Backup done, rollback plan ready |6869### Pre-Deployment Checklist7071- [ ] All tests passing72- [ ] Code reviewed and approved73- [ ] Production build successful74- [ ] Environment variables verified75- [ ] Database migrations ready (if any)76- [ ] Rollback plan documented77- [ ] Team notified78- [ ] Monitoring ready7980---8182## 3. Deployment Workflow Principles8384### The 5-Phase Process8586```871. PREPARE88 └── Verify code, build, env vars89902. BACKUP91 └── Save current state before changing92933. DEPLOY94 └── Execute with monitoring open95964. VERIFY97 └── Health check, logs, key flows98995. CONFIRM or ROLLBACK100 └── All good? Confirm. Issues? Rollback.101```102103### Phase Principles104105| Phase | Principle |106|-------|-----------|107| **Prepare** | Never deploy untested code |108| **Backup** | Can't rollback without backup |109| **Deploy** | Watch it happen, don't walk away |110| **Verify** | Trust but verify |111| **Confirm** | Have rollback trigger ready |112113---114115## 4. Post-Deployment Verification116117### What to Verify118119| Check | Why |120|-------|-----|121| **Health endpoint** | Service is running |122| **Error logs** | No new errors |123| **Key user flows** | Critical features work |124| **Performance** | Response times acceptable |125126### Verification Window127128- **First 5 minutes**: Active monitoring129- **15 minutes**: Confirm stable130- **1 hour**: Final verification131- **Next day**: Review metrics132133---134135## 5. Rollback Principles136137### When to Rollback138139| Symptom | Action |140|---------|--------|141| Service down | Rollback immediately |142| Critical errors | Rollback |143| Performance >50% degraded | Consider rollback |144| Minor issues | Fix forward if quick |145146### Rollback Strategy by Platform147148| Platform | Rollback Method |149|----------|----------------|150| **Vercel/Netlify** | Redeploy previous commit |151| **Railway/Render** | Rollback in dashboard |152| **VPS + PM2** | Restore backup, restart |153| **Docker** | Previous image tag |154| **K8s** | kubectl rollout undo |155156### Rollback Principles1571581. **Speed over perfection**: Rollback first, debug later1592. **Don't compound errors**: One rollback, not multiple changes1603. **Communicate**: Tell team what happened1614. **Post-mortem**: Understand why after stable162163---164165## 6. Zero-Downtime Deployment166167### Strategies168169| Strategy | How It Works |170|----------|--------------|171| **Rolling** | Replace instances one by one |172| **Blue-Green** | Switch traffic between environments |173| **Canary** | Gradual traffic shift |174175### Selection Principles176177| Scenario | Strategy |178|----------|----------|179| Standard release | Rolling |180| High-risk change | Blue-green (easy rollback) |181| Need validation | Canary (test with real traffic) |182183---184185## 7. Emergency Procedures186187### Service Down Priority1881891. **Assess**: What's the symptom?1902. **Quick fix**: Restart if unclear1913. **Rollback**: If restart doesn't help1924. **Investigate**: After stable193194### Investigation Order195196| Check | Common Issues |197|-------|--------------|198| **Logs** | Errors, exceptions |199| **Resources** | Disk full, memory |200| **Network** | DNS, firewall |201| **Dependencies** | Database, APIs |202203---204205## 8. Anti-Patterns206207| ❌ Don't | ✅ Do |208|----------|-------|209| Deploy on Friday | Deploy early in week |210| Rush deployment | Follow the process |211| Skip staging | Always test first |212| Deploy without backup | Backup before deploy |213| Walk away after deploy | Monitor for 15+ min |214| Multiple changes at once | One change at a time |215216---217218## 9. Decision Checklist219220Before deploying:221222- [ ] **Platform-appropriate procedure?**223- [ ] **Backup strategy ready?**224- [ ] **Rollback plan documented?**225- [ ] **Monitoring configured?**226- [ ] **Team notified?**227- [ ] **Time to monitor after?**228229---230231## 10. Best Practices2322331. **Small, frequent deploys** over big releases2342. **Feature flags** for risky changes2353. **Automate** repetitive steps2364. **Document** every deployment2375. **Review** what went wrong after issues2386. **Test rollback** before you need it239240---241242> **Remember:** Every deployment is a risk. Minimize risk through preparation, not speed.