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.
1. Create D1 databases
Section titled “1. Create D1 databases”From the repository root, run these commands. Each will create the database and update the service’s wrangler.jsonc:
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 ../..2. Create KV namespace
Section titled “2. Create KV namespace”cd backend/node3-pay-servicenpx wrangler kv namespace create zship-pay-kv --binding KV --update-configcd ../..3. Create R2 bucket
Section titled “3. Create R2 bucket”cd backend/node6-cdn-servicenpx wrangler r2 bucket create zship-cdn --binding BUCKET --update-configcd ../..4. Verify no placeholders remain
Section titled “4. Verify no placeholders remain”rg -n "00000000-0000-0000-0000-000000000000|placeholder-replace-after-create" backend/*/wrangler.jsoncIf this returns nothing, you are ready. If it finds matches, fix those configs before continuing.
5. Checklist
Section titled “5. Checklist”- All 9 D1 databases created
- KV namespace created
- R2 bucket created
- No placeholder IDs in
wrangler.jsoncfiles