LangENKO

Deploy

Ship a Mandu app — Vercel, Cloudflare Pages, Fly, Railway, Netlify, Docker, or a plain VPS. One command per target.

since v0.22
On this page

Deploy

TL;DRmandu deploy --to=<target> and Mandu generates the platform config the first time. Targets: Vercel, Cloudflare Pages, Fly, Railway, Netlify, Docker, or any VPS.

Why

Every platform wants its own config file (vercel.json, wrangler.toml, fly.toml, Dockerfile, …). Hand-syncing them across deploys is where production drifts from local. Mandu owns the config generation per target so the deploy command is identical across platforms.

Targets

Target Command Detail page
Vercel mandu deploy --to=vercel deploy/vercel
Cloudflare Pages mandu deploy --to=cloudflare deploy/cf-pages
Fly.io mandu deploy --to=fly deploy/fly
Railway mandu deploy --to=railway deploy/railway
Netlify mandu deploy --to=netlify deploy/netlify
Docker (single image) mandu deploy --to=docker deploy/docker
Docker Compose mandu deploy --to=docker-compose deploy/docker-compose

For edge runtimes (Cloudflare Workers, Vercel Edge, Deno Deploy, Netlify Edge), see edge/ — the adapter selection lives there because edge targets restrict the API surface.

Generic flow

# First-time: generate platform config + deploy
mandu deploy --to=vercel

# Re-deploy after code changes
git push                         # if connected to Vercel/Netlify
# or
mandu deploy --to=fly            # for non-git targets

🤖 Agent Prompt

🤖 Agent Prompt — Deploy
Deploy my Mandu app to <TARGET> (one of: vercel, cloudflare, fly,
railway, netlify, docker, docker-compose).

Steps:
1. Run `mandu deploy --to=<TARGET>`. This generates the platform's
   config file (vercel.json, wrangler.toml, fly.toml, Dockerfile etc.)
   on first run, then triggers the deploy.
2. Commit the generated config — it is the deploy contract.
3. For edge targets, confirm the route's API surface is edge-safe by
   checking the relevant adapter page under /docs/edge.

Required invariants:
- Don't bypass `mandu deploy` with `npx vercel` / `flyctl deploy`.
- Never edit files in `dist/` by hand.
- Container entry is `dist/server/main.js` for docker/fly/railway.

After deploy, fetch the live URL and confirm `/`, `/docs`, and any
auth flow render. Report any 5xx in the deploy log.

For Agents

AI hint

Use `mandu deploy --to=<target>` once per environment. Mandu generates `vercel.json`, `wrangler.toml`, `fly.toml`, `Dockerfile` etc. on first deploy. The static build target writes to `dist/` — never edit dist files by hand.

Invariants
  • Use `mandu deploy --to=<target>` (not `npx vercel` / `flyctl deploy` directly) so the generated config matches the runtime expectations
  • Generated config files (`vercel.json`, `wrangler.toml`, `fly.toml`, `Dockerfile`) must be committed; they are the deploy contract
  • The static build output lives at `dist/`; the production server entry is `dist/server/main.js` for container targets
  • Edge targets (Cloudflare Workers, Vercel Edge) have stricter API surface — see `edge/` for adapter notes before deploying
Guard scope
deploy