Migrate from Vercel
Vercel is opinionated around the Next.js shape. Joule Cloud doesn't have a Next-specific runtime — we run any container — but the deploy ergonomics are similar and the Next app keeps working. The trade: less Vercel-specific magic; more control over where it runs and what it costs.
The mental model
| Vercel | Joule Cloud |
|---|---|
| Vercel Functions / Edge Functions | Functions |
| Vercel Compute / fluid compute | Compute |
| Vercel Storage (Blob) | Object Store |
| Vercel Postgres (Neon) | JouleDB |
| Vercel KV (Upstash) | JouleDB indexed key-value |
| Edge Config | Object Store + cached read |
| Vercel AI SDK | OpenAI-shape baseURL swap — see Node SDK |
Deploying a Next.js app
Vercel auto-builds your Next app behind the scenes. We need a Dockerfile (Next has supported standalone output for a while):
Dockerfile
FROM node:22-alpine AS deps
WORKDIR /app
COPY package.json package-lock.json* ./
RUN npm ci
FROM node:22-alpine AS builder
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .
RUN npm run build
FROM node:22-alpine AS runner
WORKDIR /app
COPY --from=builder /app/.next/standalone ./
COPY --from=builder /app/.next/static ./.next/static
COPY --from=builder /app/public ./public
EXPOSE 3000
CMD ["node", "server.js"]
invisible.hcl
workload "site" {
image = "ghcr.io/me/mysite:1.0"
region = "auto"
cpu = "1 vCPU"
memory = "1 GB"
scale {
min = 0 # scale to zero like Vercel
max = 30
on_metric = "requests_per_sec > 50"
}
}
route "mysite.com" {
to = workload.site
https = true
}
Vercel AI SDK keeps working
import { createOpenAI } from "@ai-sdk/openai";
import { generateText } from "ai";
const jc = createOpenAI({
baseURL: "https://api.greenjoules.cloud/v1",
apiKey: process.env.JC_API_KEY,
});
const { text } = await generateText({
model: jc("auto"),
prompt: "Hi",
});
What you lose
- Vercel preview deployments per PR — we don't do that automatically. Pattern: deploy a per-branch workload from CI.
- Vercel's integrated analytics — we don't have an equivalent; bring your own.
- The "git push, magic deploy" loop — you push the image and apply the HCL.
What you gain
- The bill stops mid-sentence: pay for joules, not for VFC ("Vercel Function Compute") units.
- Region pinning is a config line, not a Vercel Pro feature.
- You can run Python, Rust, Go, Java — not just Node + Edge.