Deploy
What happens when you click Deploy?
What actually happens when you click “Deploy”
You hit Deploy and your app goes live in seconds.
But instead of imagining a split system (CDN / edge / serverless / etc.), we simplify the model:
Your entire app runs inside one Firecracker VM
started with:
npm run start
Step 0 — Git push triggers deploy
GitHub sends a webhook to the deployment system.
A worker is picked from a warm pool almost instantly.
Step 1 — VM is allocated
A fresh Firecracker microVM is created.
Inside it:
- repo is mounted
- environment variables are injected
- runtime is prepared
Boot is extremely fast because Firecracker is designed for serverless-style workloads.
Step 2 — Dependencies are installed (or restored)
The system checks your cache:
- If
package-lock.jsonis unchanged → reuse cached dependencies - Otherwise → run full install
This is one of the biggest reasons repeat deploys feel much faster.
Step 3 — Build step
Your app is built normally:
npm run buildBut with awareness that this is a Next.js project:
- server bundle is created
- client bundle is generated
- routing is prepared
- production output is optimized
Still: everything stays inside the same VM.
No splitting into edge/CDN/serverless layers.
Step 4 — Start the application
Now the VM runs your app:
npm run startThis launches the Next.js server inside the Firecracker VM.
It handles:
- page rendering
- API routes
- server-side logic
- data fetching
One process. One environment. Everything included.
Step 5 — Deployment goes live
Once the server is healthy, traffic is routed to this VM.
Older deployments remain unchanged and still runnable.
Rollback is just a pointer switch — no rebuild needed.
Step 6 — First request hits production
A user opens your site:
- DNS resolves to entry point
- request is forwarded to your VM
- Next.js server handles everything
- response streams back
No infrastructure fragmentation — just request → app → response.
Mental model
Instead of thinking:
- CDN
- Edge functions
- Serverless SSR
- ISR layers
Think:
One deployment = one Firecracker VM running
npm run start
Simple, predictable, and fully isolated per deploy.