ShipAny Docs

Deploy

Cloudflare Workers — One Command

ShipAny TanStack is built to ship to Cloudflare Workers. In Claude Code, run:

/deploy-cloudflare

That single skill drives the entire production deployment:

Auth check

Verifies wrangler whoami; only triggers a browser login if you're not authenticated yet.

Database provisioning

Creates a D1 database (default, zero external infra) and writes the binding into wrangler.jsonc — or, if you mention Postgres/Neon/Supabase, sets up Hyperdrive against your existing PostgreSQL instead.

Schema migrations

Applies drizzle migrations to the remote database (wrangler d1 migrations apply --remote, or pnpm db:migrate directly against Postgres).

RBAC seed + secrets

Seeds default roles/permissions on the remote DB and uploads secrets (AUTH_SECRET etc.) via wrangler secret put — secret values are never echoed to the screen.

Build + deploy

NITRO_PRESET=cloudflare_module vite build then wrangler deploy (wrapped in pnpm cf:deploy). The final deploy always asks for confirmation — it's the only irreversible step.

URL fixup + admin account

Bakes the real *.workers.dev (or custom domain) URL into the bundle, and on first deploy offers to create / promote a super_admin account so you can log into /admin immediately.

Idempotent by design — "ship again" simply means running /deploy-cloudflare again: every phase detects existing state (D1 exists, migrations applied, secrets uploaded, admin exists) and skips itself; only the fresh build + deploy runs.

Useful flags:

/deploy-cloudflare --domain=app.example.com      # bind a custom domain
/deploy-cloudflare --admin-email=X --admin-password=Y   # set up the admin account
/deploy-cloudflare --rotate-secrets               # force re-upload all secrets

D1 vs Postgres (Hyperdrive)

D1 (default)Postgres + Hyperdrive
WhenZero external infraYou already have Postgres (Neon/Supabase/RDS) or need PG features
Bindingd1_databasesDBhyperdriveHYPERDRIVE
Schema pushwrangler d1 migrations apply --remotepnpm db:migrate directly against PG

Manual deploy

If you prefer the raw commands:

pnpm cf:build    # NITRO_PRESET=cloudflare_module vite build
pnpm cf:deploy   # build + wrangler deploy

Node Server

pnpm build produces a self-contained nitro output:

pnpm build
node .output/server/index.mjs   # serves on port 3000

Docker

Multi-stage Dockerfile (node:22-alpine, non-root user, port 3000):

docker build -t my-app .
docker run -p 3000:3000 --env-file .env.production my-app

DATABASE_PROVIDER is baked in at build time. To target PostgreSQL: docker build --build-arg DATABASE_PROVIDER=postgres -t my-app .