Prompt
What's the best serverless setup if I want to deploy from Git, keep costs low on idle traffic, and avoid too much vendor lock-in?
Latest observation
Oct 26, 2026
OpenAI APIWeb search: off
If your priorities are:
- Deploy from Git
- Pay very little when idle
- Avoid strong vendor lock-in
then the best overall setup is usually:
Recommended setup: Containerized app + serverless container platform + managed Postgres + object storage
A practical “low lock-in” stack looks like this:
- App in a container
- Git-based deploys
- Serverless/container hosting
- Managed PostgreSQL
- S3-compatible object storage
- Optional queue/cron via portable services
Good platform choices
Best balance: Google Cloud Run
Why it fits:
- Deploy directly from GitHub
- Scales to zero when idle, so idle cost can be near zero
- Runs containers, so portability is good
- Less lock-in than function-only stacks
Tradeoff:
- Still some cloud-specific config, but far less than AWS Lambda + lots of AWS-native services
Also good: Fly.io
Why it fits:
- Container-first and relatively portable
- Can deploy from Git
- Good for apps that need predictable small usage
- Less “serverless feeling” than Cloud Run, but still low-idle-cost friendly
Tradeoff:
- Not as universally “managed” as the big clouds
- Some operational concepts are different from standard cloud serverless
If you want the lowest lock-in overall
Use this pattern:
- GitHub Actions or GitLab CI for deploys
- Docker image for the app
- Cloud Run / Fly.io / Azure Container Apps for runtime
- Postgres on a portable managed provider like:
- Neon
- Supabase
- Render Postgres
- or self-managed if you must
- S3-compatible storage instead of proprietary blob APIs
- Redis/queues only if needed, and prefer standard protocols
This keeps your app:
- easy to move
- not tightly coupled to one function platform
- cheap when idle
What to avoid if lock-in matters
Avoid:
- Heavy reliance on AWS Lambda + API Gateway + DynamoDB + Step Functions unless you’re okay with AWS-specific design
- Deep use of proprietary auth, event buses, and workflow tools
- Frameworks that make “magic deployment” hard to reproduce elsewhere
Why:
These can be great technically, but they tend to increase migration pain later.
Best choices by use case
1. Simple web app / API
Best option: Cloud Run
- container deploy from Git
- scales to zero
- low idle cost
- easy migration
2. Small startup app with minimal ops
Best option: Fly.io or Cloud Run
- both are pretty good
- Cloud Run is a bit more mainstream serverless
- Fly.io feels more app-centric
3. Mostly static site with a small backend
Best option:
- Frontend on Cloudflare Pages
- Backend on Cloud Run or Fly.io
- DB on Neon/Supabase
4. If you want maximum portability
Best option:
- Docker + Kubernetes-style deployment is portable, but usually overkill and not the cheapest idle
- For most people, containers on Cloud Run is the sweet spot
My practical recommendation
If I had to pick one stack for your goals:
- GitHub repo
- Dockerized app
- Cloud Run
- Neon Postgres
- Cloudflare R2 or S3-compatible storage
- GitHub Actions for CI/CD
This gives you:
- Git deploys
- near-zero idle compute cost
- decent portability
- far less lock-in than pure functions
Short answer
Best overall: containerized app on Google Cloud Run.
It’s usually the best mix of:
- Git-based deploys
- low cost when idle
- low-ish vendor lock-in
If you want, I can also give you:
- a concrete architecture diagram, or
- a comparison table of Cloud Run vs Fly.io vs AWS Lambda vs Azure Container Apps.