Skip to content

CLI: Prepare Cloudflare Resources

Create the required Cloudflare resources for core delivery (9 D1, 1 KV, 1 R2) before deploying real code. Workers are created automatically when you run wrangler deploy — the name in each wrangler.jsonc defines the Worker, and bindings are applied on deploy. Value-added services (e.g. zship-provider1-service) are not included.

From the repository root, run these commands. Each will create the database and update the service’s wrangler.jsonc:

Terminal window
cd backend/node1-auth-service && npx wrangler d1 create zship-auth --binding DB --update-config && cd ../..
cd backend/node2-support-service && npx wrangler d1 create zship-support --binding DB --update-config && cd ../..
cd backend/node3-pay-service && npx wrangler d1 create zship-pay --binding DB --update-config && cd ../..
cd backend/node4-notify-service && npx wrangler d1 create zship-notify --binding DB --update-config && cd ../..
cd backend/node5-blog-service && npx wrangler d1 create zship-blog --binding DB --update-config && cd ../..
cd backend/node7-site-service && npx wrangler d1 create zship-site --binding DB --update-config && cd ../..
cd backend/node8-prompt-service && npx wrangler d1 create zship-prompt --binding DB --update-config && cd ../..
cd backend/node9-checkin-service && npx wrangler d1 create zship-checkin --binding DB --update-config && cd ../..
cd backend/node10-ai-service && npx wrangler d1 create zship-ai --binding DB --update-config && cd ../..
Terminal window
cd backend/node3-pay-service
npx wrangler kv namespace create zship-pay-kv --binding KV --update-config
cd ../..
Terminal window
cd backend/node6-cdn-service
npx wrangler r2 bucket create zship-cdn --binding BUCKET --update-config
cd ../..
Terminal window
rg -n "00000000-0000-0000-0000-000000000000|placeholder-replace-after-create" backend/*/wrangler.jsonc

If this returns nothing, you are ready. If it finds matches, fix those configs before continuing.

  • All 9 D1 databases created
  • KV namespace created
  • R2 bucket created
  • No placeholder IDs in wrangler.jsonc files