deployment-patterns
Deployment workflows, CI/CD pipeline patterns, Docker containerization, health checks, rollback strategies, and production readiness checklists for web applications. Use when setting up CI/CD, containerizing an app, or checking production readiness before a release.
By affaan-m · 3,006 installs
npx skills add affaan-m/ecc --skill deployment-patterns
Source repository · Upstream listing
Deployment Patterns
Production deployment workflows and CI/CD best practices.
When to Activate
Setting up CI/CD pipelines
Dockerizing an application
Planning deployment strategy (blue green, canary, rolling)
Implementing health checks and readiness probes
Preparing for a production release
Configuring environment specific settings
Deployment Strategies
Rolling Deployment (Default)
Replace instances gradually — old and new versions run simultaneously during rollout.
Pros: Zero downtime, gradual rollout
Cons: Two versions run simultaneously — requires backward compatible changes
Use when: Standard deployments, backward compatible changes
Blue Green Deployment
Run two identical environments. Switch traffic atomically.
Pros: Instant rollback (switch back to blue), clean cutover
Cons: Requires 2x infrastructure during deployment
Use when: Critical services, zero tolerance for issues
Canary Deployment
Route a small percentage of traffic to the new version first.
Pros: Catches issues with real traffic before full rollout
Cons: Requires traffic splitting infrastructure, monitoring
Use when: High traffic services, risky changes, feature flags
Docker
Multi Stage Dockerfile (Node.js)
Multi Stage Dockerfile (Go)
Multi Stage Dockerfile (Python/Django)
Docker Best Practices
CI/CD Pipeline
GitHub Actions (Standard Pipeline)
Pipeline Stages
Health Checks
Health Check Endpoint
Kubernetes Probes
Environment Configuration
Twelve Factor App Pattern
Configuration Validation
Rollback Strategy
Instant Rollback
Rollback Checklist
[ ] Previous image/artifact is available and tagged
[ ] Database migrations are backward compatible (no destructive changes)
[ ] Feature flags can disable new features without deploy
[ ] Monitoring alerts configured for error rate spikes
[ ] Rollback tested in staging before production release
Production Readiness Checklist
Before any production deployment:
Application
[ ] All tests pass (unit, integration, E2E)
[ ] No hardcoded secrets in code or config files
[ ] Error handling covers all edge cases
[ ] Logging is structured (JSON) and does not contain PII
[ ] Health check endpoint returns meaningful status
Infrastructure
[ ] Docker image builds reproducibly (pinned versions)
[ ] Environment variables documented and validated at startup
[ ] Resource limits set (CPU, memory)
[ ] Horizontal scaling configured (min/max instances)
[ ] SSL/TLS enabled on all endpoints
Monitoring
[ ] Application metrics exported (request rate, latency, errors)
[ ] Alerts configured for error rate threshold
[ ] Log aggregation set up (structured logs, searchable)
[ ] Uptime monitoring on health endpoint
Security
[ ] Dependencies scanned for CVEs
[ ] CORS configured for allowed origins only
[ ] Rate limiting enabled on public endpoints
[ ] Authentication and authorization verified
[ ] Security headers set (CSP, HSTS, X Frame Options)
Operations
[ ] Rollback plan documented and tested
[ ] Database migration tested against production sized data
[ ] Runbook for common failure scenarios
[ ] On call rotation and escalation path defined