WebindexDocs

Operations

Deploy

Migrations, secrets and going live.

Cloudflare setup

Create the production D1 database:

Terminal
npx wrangler login
npx wrangler d1 create website-catalog-db

Copy the returned database ID into wrangler.jsonc, replacing the all-zero placeholder. Then generate fresh binding types and apply the migration:

Terminal
npm run cf-typegen
npm run db:migrate:remote

Deploy the Next.js application to Cloudflare Workers:

Terminal
npm run deploy

Deploy from your machine

Important

The wrangler login sees several Cloudflare accounts. Set CLOUDFLARE_ACCOUNT_ID to the APPNEURAL account in your shell first, or Wrangler stops to ask.

Terminal
npm install
npm run db:migrate:remote
npm run deploy

Set the secrets once (they stay across deploys):

Terminal
npx wrangler secret put EDIT_PASSCODE

Database migrations

Applied in order from migrations/:

# Migration
0001 create websites
0002 add website stage
0003 add provisioning status
0004 replace website catalog
0005 add website infrastructure
0006 remove public website subdomains
0007 enable catalog owned website routing
0008 add website priority
0009 add edit auth
0010 add checklist and documents
0011 add document uploads
0012 add checklist due date
0013 add project planning fields
0014 add document notes
0015 allow note document kind
0016 add assignee and subtasks
0017 add on hold dependency attachments comments
0018 upgrade task attachments to documents
0019 add missing checklist websites
0020 add website types
0021 product catalog websites are products

Check that it is live

Terminal
curl https://websites.appneurox.com/health

It answers {"status":"ok"} when the Worker and its database are up.

Last updated 2 November 2026