// Choose deployment strategy and infrastructure. Use when deciding where to deploy applications, setting up CI/CD, or configuring production environments. Covers Vercel, Railway, AWS, Cloudflare Workers, and Docker.
| name | Deployment Advisor |
| description | Choose deployment strategy and infrastructure. Use when deciding where to deploy applications, setting up CI/CD, or configuring production environments. Covers Vercel, Railway, AWS, Cloudflare Workers, and Docker. |
| version | 1.0.0 |
Choose the right deployment strategy for your application scale and requirements.
Start simple, scale when needed. Don't over-engineer infrastructure for 10 users that won't arrive for months.
Cost: $0-$20/month Time to Deploy: 5-15 minutes Best for: MVPs, prototypes, side projects, marketing sites
Recommended Platforms:
Vercel (Next.js, React, static sites):
Netlify (Static sites, Jamstack):
Railway (Full-stack, databases):
Cloudflare Pages (Static + Workers):
Cost: $20-$500/month Time to Deploy: 1-4 hours Best for: Validated products, growing startups, paid customers
Recommended Platforms:
AWS Amplify (Full-stack web apps):
Google Cloud Run (Containerized apps):
Fly.io (Distributed apps):
Render (Simpler alternative to AWS):
Cost: $500-$5,000+/month Time to Deploy: 1-4 weeks Best for: High traffic, enterprise, compliance requirements
Recommended Platforms:
AWS ECS (Containers, no Kubernetes complexity):
AWS EKS / Google GKE (Kubernetes):
DigitalOcean App Platform (Mid-tier simplicity):
Static site (HTML, CSS, JS): โ Vercel, Netlify, Cloudflare Pages
Next.js app: โ Vercel (best integration), Netlify
React/Vue/Angular SPA: โ Vercel, Netlify, Cloudflare Pages
Node.js API: โ Railway, Render, Fly.io, AWS Amplify
Python API (FastAPI, Flask, Django): โ Railway, Render, Fly.io, Google Cloud Run
Go/Rust API: โ Fly.io, Railway, Google Cloud Run
Full-stack (Frontend + Backend + DB): โ Railway, Render, AWS Amplify
Microservices: โ Fly.io, Google Cloud Run, AWS ECS
No database: โ Vercel, Netlify, Cloudflare Pages
Serverless database (PostgreSQL, MySQL): โ Railway, Render (integrated), AWS RDS, Supabase
Redis/caching: โ Railway, Render, AWS ElastiCache, Upstash
MongoDB: โ MongoDB Atlas, Railway, AWS DocumentDB
<100 users (MVP): โ Free/cheap tiers: Vercel free, Railway $5
100-1,000 users: โ Vercel Pro ($20), Railway ($20-50), Render
1K-10K users: โ Railway ($50-100), AWS Amplify, Cloud Run
10K-100K users: โ AWS Amplify, Cloud Run, Fly.io ($100-500)
100K-1M users: โ AWS ECS, GKE, dedicated servers ($500-5000)
Single region (US/Europe): โ Any platform
Global (low latency worldwide): โ Cloudflare Pages/Workers, Vercel Edge, Fly.io (multi-region)
China/Asia: โ Cloudflare, Fly.io Hong Kong, Alibaba Cloud
Compliance (HIPAA, SOC 2, GDPR): โ AWS, Google Cloud, Azure (compliance certifications)
Long-running jobs (>15 min): โ Railway, Render Background Workers, AWS ECS
WebSockets/real-time: โ Railway, Render, Fly.io, AWS ECS
High compute (video processing, ML): โ AWS ECS/EKS, Google Cloud Run, dedicated GPUs
Platforms: Vercel, Netlify, Railway, Render
Setup (5 minutes):
npm run builddist or .nextEnvironment Variables:
DATABASE_URL=postgresql://...
API_KEY=secret_key
NODE_ENV=production
Preview Deployments:
Use when: Custom tests, security scans, multi-stage deploys
# .github/workflows/deploy.yml
name: Deploy to Production
on:
push:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18'
- run: npm ci
- run: npm test
- run: npm run lint
deploy:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: amondnet/vercel-action@v20
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ secrets.ORG_ID }}
vercel-project-id: ${{ secrets.PROJECT_ID }}
vercel-args: '--prod'
Features:
Pipeline Stages:
Build โ Test โ Security Scan โ Stage Deploy โ Integration Tests โ Prod Deploy
Tools:
Stack: Next.js (Vercel) + API (Railway/Supabase)
Pros: Fast, cheap, scales easily Cons: Not suitable for real-time or server-heavy apps
Frontend (Vercel) โ API (Railway) โ Database (Supabase)
Stack: Vercel Functions + Serverless DB (Supabase/PlanetScale)
Pros: Zero server management, pay per use Cons: Cold starts, vendor lock-in
Frontend (Vercel) โ Edge Functions (Vercel) โ Serverless DB
Stack: Railway (Node.js + PostgreSQL)
Pros: Simple, everything in one place Cons: Single point of failure
Railway: Node.js API + PostgreSQL + Redis
Stack: Multiple Cloud Run services + Cloud SQL
Pros: Independent scaling, fault isolation Cons: Complex, higher cost
Frontend (Vercel) โ Service 1 (Cloud Run) โ Database
โ Service 2 (Cloud Run) โ Queue
Total: $0-5/month for MVP
Simple marketing site: โ Vercel + Contentful CMS
SaaS MVP: โ Next.js (Vercel) + Supabase (DB + Auth) + Stripe
Internal tool: โ React (Netlify) + FastAPI (Railway) + PostgreSQL (Railway)
Mobile app backend: โ FastAPI (Cloud Run) + Cloud SQL + Firebase Auth
E-commerce: โ Next.js (Vercel) + Shopify/Stripe + PostgreSQL (Supabase)
Related Skills:
frontend-builder - For building apps to deployapi-designer - For API architectureperformance-optimizer - For optimizing deployed appsRelated Patterns:
META/DECISION-FRAMEWORK.md - Platform selection guidanceSTANDARDS/architecture-patterns/deployment-patterns.md - Deployment architectures (when created)Related Playbooks:
PLAYBOOKS/deploy-to-vercel.md - Vercel deployment guide (when created)PLAYBOOKS/setup-cicd.md - CI/CD setup procedure (when created)