Deployments
Attach any Cloudflare Workers app to your Omnibase project, run it locally, and deploy it to the edge
Deployments
A deployment is any app you're building that runs on Cloudflare Workers. It doesn't matter what framework or language it uses — Hono, a Vite frontend, a Go or Rust Worker, Next.js via OpenNext, or anything else that can be deployed with wrangler. Omnibase treats every deployment the same way: it runs the app locally during development and ships it to the edge on deploy.
Deployments are declared in omnibase/omnibase.toml under [[deployments]], each pointing at a directory with a wrangler.toml, wrangler.jsonc, or wrangler.json.
What Can Be a Deployment?
Anything wrangler can deploy:
- Hono / plain Workers — a
src/index.tsentrypoint - Frontend frameworks — Next.js via OpenNext, Vite, Remix, and the like, compiled to a worker bundle
- Compiled languages — Go, Rust, Python, and anything else targeting the Workers runtime
- Any other wrangler app — as long as it has a wrangler config and produces a worker bundle
Declaring Deployments
# omnibase/omnibase.toml
[[deployments]]
name = "dashboard"
path = "../apps/dashboard"
[[deployments]]
name = "api"
path = "../apps/api"
port = 8788name— a label used in CLI output and cloud deploy namingpath— directory relative toomnibase/; must contain a wrangler config and abun run devscriptport— local dev port, defaults to8787 + deployment index
The Omnibase repo itself is a real example — public/omnibase.toml declares three deployments (dashboard, docs, website) pointing at public/apps/*, each with its own wrangler.jsonc.
Run Locally
omnibase startThis starts the control plane (API, auth, permissions, Postgres, storage, email) with Docker Compose, then spawns bun run dev in every deployment directory on http://localhost:<port> (default 8787 for the first). Each dev server receives the same resolved environment it would get in the cloud.
Deploy
omnibase cloud workers deployThis builds, packages, and uploads one or more deployments to managed hosting:
- Resolve the target environment — the one you selected interactively or passed with
--env. - Load the resolved variables for that branch from
omnibase/.env.<env>(falling back through the normal resolution order). - Run
bunx wrangler deploy --dry-run --outdir .bundlein each deployment directory with those variables exported. - Package the output into a self-contained bundle and upload it; managed hosting deploys it to the edge and returns the live URL.
Each deployment declares a build.command in its wrangler config. wrangler deploy --dry-run runs that command before bundling, so cloud workers deploy builds the app as part of the deploy — there's no separate build step to run first. The command is whatever your framework or language uses (bun run build, vite build, opennextjs-cloudflare build, …).
Pick a deployment with --name, deploy them all with --all, or choose one interactively:
omnibase cloud workers deploy --env main
omnibase cloud workers deploy --env main --name dashboard
omnibase cloud workers deploy --env main --allDeploy Reference
Full flags and the end-to-end build and upload flow
Environment Variables
Build-time injection, {VAR} interpolation, and where secrets live
The Build Hook
cloud workers deploy builds your app through the wrangler config's build.command:
// apps/api/wrangler.jsonc
{
"main": "dist/worker.js",
"name": "my-api",
"compatibility_date": "2026-09-21",
"build": {
"command": "bun run build"
},
"assets": {
"directory": "dist/assets",
"binding": "ASSETS"
},
"vars": {
"PUBLIC_WEBSITE_URL": "{PUBLIC_WEBSITE_URL}",
"OMNIBASE_API_URL": "{OMNIBASE_API_URL}"
}
}build.command is the only build entrypoint Omnibase needs — point it at whatever produces your worker bundle (and assets directory, if any). cloud workers deploy runs it before packaging, so the deployed artifact is always freshly built. Values like {PUBLIC_WEBSITE_URL} are placeholders filled from omnibase/.env.<env> at deploy time — see Environment Variables.
Workers
For Hono-based edge functions, cron jobs, and queues on top of the sample worker, see the Workers guide.