Every time I start a new SaaS project, I go through the same infrastructure decisions. Here's what I've landed on after 5 years of iterations.
The Stack
- Application: Laravel (PHP 8.3)
- Frontend: Vue.js 3 + Inertia.js or React
- Database: MySQL 8 (primary) + Redis (cache + queues)
- Hosting: DigitalOcean Droplets (scalable, cost-effective)
- CI/CD: GitHub Actions → Docker → deployment
- Storage: S3-compatible (Cloudflare R2 — much cheaper than AWS S3)
- Email: Postmark (deliverability matters)
- Monitoring: Sentry + Laravel Pulse
Why Not AWS/GCP/Azure?
For most SaaS products under $50k MRR, managed VPS (DigitalOcean/Hetzner) is significantly cheaper and simpler. Migrate to AWS when you actually need the services it offers — not before.
Docker in Production
I containerize everything using Docker Compose for local dev and Docker Swarm or a simple Nginx + PHP-FPM + Supervisor setup in production. This makes environment parity reliable.
Zero-Downtime Deployments
Using Laravel Forge or a custom deployment script with php artisan down --retry=60, git pull, composer install, migrate, and php artisan up. Alternatively, blue-green deployments with two containers behind a load balancer.
The Cost Breakdown
For a new SaaS at launch: ~$50/month for a comfortable setup (2 droplets + managed database + R2 storage). Scale to $200-500/month as you grow, before needing to re-architect anything.