Deployment
Forge treats deployment as a first-class command, not an afterthought. Set your
target in forge.config.ts, then run a single command.
forge deployTargets
Vercel
The default. Forge generates the project settings, wires environment variables, and runs migrations as a post-deploy step.
forge deploy --target vercelCloudflare
Builds for the edge runtime and publishes with Wrangler:
forge deploy --target cloudflareEdge constraints
The Cloudflare target runs on the edge runtime. Node-only APIs are flagged at build time so you find incompatibilities before deploy, not after.
Docker
For self-hosting, Forge writes a multi-stage Dockerfile and builds an image:
forge deploy --target docker --tag my-app:latestFROM node:22-alpine AS build
WORKDIR /app
COPY . .
RUN npm ci && npm run build
FROM node:22-alpine
WORKDIR /app
COPY --from=build /app/.next/standalone ./
EXPOSE 3000
CMD ["node", "server.js"]Pre-deploy checks
Every deploy runs the same gate locally first, so a broken build never leaves your machine:
forge deploy
✔ Type check
✔ Lint
✔ Build
✔ Migrations up to date
→ Uploading…Migrations
Forge runs pending database migrations automatically after a successful deploy. To run them manually:
forge db migrate