Skip to Content
Omnibase
Deployments

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.ts entrypoint
  • 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 = 8788
  • name — a label used in CLI output and cloud deploy naming
  • path — directory relative to omnibase/; must contain a wrangler config and a bun run dev script
  • port — local dev port, defaults to 8787 + 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 start

This 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 deploy

This builds, packages, and uploads one or more deployments to managed hosting:

  1. Resolve the target environment — the one you selected interactively or passed with --env.
  2. Load the resolved variables for that branch from omnibase/.env.<env> (falling back through the normal resolution order).
  3. Run bunx wrangler deploy --dry-run --outdir .bundle in each deployment directory with those variables exported.
  4. 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 --all

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.

On this page