PaaS: Deploy Tanpa Kelola Server
PaaS (Platform as a Service) memungkinkan kamu fokus pada kode tanpa mengurus server, OS, atau infrastructure. Push kode, platform handle sisanya.
Platform Populer
- Vercel — Optimized untuk Next.js/React, edge functions, preview deployments
- Railway — Full-stack, support database, simple pricing
- Render — Alternative Heroku, auto-deploy dari Git
- Fly.io — Deploy Docker containers globally
- Netlify — Jamstack, serverless functions
Vercel Deployment
# Install Vercel CLI
npm i -g vercel
# Deploy (link ke project)
vercel
# Deploy ke production
vercel --prod
# Environment variables
vercel env add DATABASE_URL production
# vercel.json konfigurasi
{
"framework": "vite",
"buildCommand": "npm run build",
"outputDirectory": "dist"
}
Railway Deployment
# Install Railway CLI
npm i -g @railway/cli
# Login & init
railway login
railway init
# Deploy
railway up
# Add database
railway add --plugin postgresql
# Environment variables otomatis tersedia:
# DATABASE_URL, PGHOST, PGPORT, etc.
PaaS vs VPS: Kapan Pakai Apa?
- PaaS — MVP, side project, tim kecil, butuh cepat launch
- VPS — Butuh kontrol penuh, custom software, optimasi biaya di skala besar