fix: update wrangler.jsonc and deployment instructions
- Move route and vars to top level in wrangler.jsonc (remove env.production wrapper) - Update deployment instructions: use 'npx wrangler deploy' without --env flags - Update all documentation (README.md, .cursorrules, CLAUDE.md) to reflect correct deployment process - Route configured as agents.nicholai.work at top level
This commit is contained in:
parent
4ef7d55530
commit
c2185713a6
@ -326,7 +326,7 @@ npx @opennextjs/cloudflare build
|
|||||||
npx wrangler deploy
|
npx wrangler deploy
|
||||||
```
|
```
|
||||||
|
|
||||||
Update `wrangler.jsonc` with new env vars in `vars` section.
|
**Important:** Always use `npx wrangler deploy` without any `--env` flags. The deployment uses the default configuration from `wrangler.jsonc` with route `agents.nicholai.work`. Update `wrangler.jsonc` with new env vars in the top-level `vars` section.
|
||||||
|
|
||||||
## Debugging Tips
|
## Debugging Tips
|
||||||
|
|
||||||
|
|||||||
@ -22,11 +22,12 @@ pnpm test:coverage # Generate test coverage report
|
|||||||
```bash
|
```bash
|
||||||
npx @opennextjs/cloudflare build # Convert Next.js build to Cloudflare Workers format
|
npx @opennextjs/cloudflare build # Convert Next.js build to Cloudflare Workers format
|
||||||
npx wrangler deploy # Deploy to Cloudflare (requires OpenNext build first)
|
npx wrangler deploy # Deploy to Cloudflare (requires OpenNext build first)
|
||||||
npx wrangler deploy --env="" # Deploy to default environment explicitly
|
|
||||||
npx wrangler tail # View live logs from deployed worker
|
npx wrangler tail # View live logs from deployed worker
|
||||||
```
|
```
|
||||||
|
|
||||||
**Critical**: Always run `npx @opennextjs/cloudflare build` before deploying. The standard `next build` alone is insufficient for Cloudflare deployment.
|
**Critical**:
|
||||||
|
- Always run `npx @opennextjs/cloudflare build` before deploying. The standard `next build` alone is insufficient for Cloudflare deployment.
|
||||||
|
- Always use `npx wrangler deploy` without any `--env` flags. The deployment uses the default configuration from `wrangler.jsonc` with route `agents.nicholai.work`.
|
||||||
|
|
||||||
## Architecture
|
## Architecture
|
||||||
|
|
||||||
@ -111,8 +112,10 @@ The route handles multiple n8n response formats:
|
|||||||
### wrangler.jsonc
|
### wrangler.jsonc
|
||||||
- Worker entry: `.open-next/worker.js` (generated by OpenNext)
|
- Worker entry: `.open-next/worker.js` (generated by OpenNext)
|
||||||
- Assets directory: `.open-next/assets`
|
- Assets directory: `.open-next/assets`
|
||||||
- Production route: `agents.nicholai.work`
|
- Route: `agents.nicholai.work` (configured at top level, not in env section)
|
||||||
|
- Environment variables: Configured in top-level `vars` section
|
||||||
- Compatibility flags: `nodejs_compat`, `global_fetch_strictly_public`
|
- Compatibility flags: `nodejs_compat`, `global_fetch_strictly_public`
|
||||||
|
- **Important:** Deployment uses default configuration - do not use `--env` flags
|
||||||
|
|
||||||
### Build Output
|
### Build Output
|
||||||
- Standard Next.js build: `.next/`
|
- Standard Next.js build: `.next/`
|
||||||
|
|||||||
@ -218,10 +218,7 @@ Deploy to Cloudflare Workers:
|
|||||||
npx wrangler deploy
|
npx wrangler deploy
|
||||||
```
|
```
|
||||||
|
|
||||||
Or for specific environment:
|
**Note:** The deployment uses the default configuration from `wrangler.jsonc` with route `agents.nicholai.work`. Do not use `--env` flags.
|
||||||
```bash
|
|
||||||
npx wrangler deploy --env production
|
|
||||||
```
|
|
||||||
|
|
||||||
3. **View logs**
|
3. **View logs**
|
||||||
```bash
|
```bash
|
||||||
|
|||||||
@ -12,20 +12,17 @@
|
|||||||
"nodejs_compat",
|
"nodejs_compat",
|
||||||
"global_fetch_strictly_public"
|
"global_fetch_strictly_public"
|
||||||
],
|
],
|
||||||
"env": {
|
"route": "agents.nicholai.work",
|
||||||
"production": {
|
"vars": {
|
||||||
"route": "agents.nicholai.work",
|
"AGENT_1_URL": "https://n8n.biohazardvfx.com/webhook/d2ab4653-a107-412c-a905-ccd80e5b76cd",
|
||||||
"vars": {
|
"AGENT_1_NAME": "Repoguide",
|
||||||
"AGENT_1_URL": "https://n8n.biohazardvfx.com/webhook/d2ab4653-a107-412c-a905-ccd80e5b76cd",
|
"AGENT_1_DESCRIPTION": "Documenting the development process.",
|
||||||
"AGENT_1_NAME": "Repoguide",
|
"AGENT_2_URL": "https://n8n.biohazardvfx.com/webhook/0884bd10-256d-441c-971c-b9f1c8506fdf",
|
||||||
"AGENT_1_DESCRIPTION": "Documenting the development process.",
|
"AGENT_2_NAME": "Morgan",
|
||||||
"AGENT_2_URL": "https://n8n.biohazardvfx.com/webhook/0884bd10-256d-441c-971c-b9f1c8506fdf",
|
"AGENT_2_DESCRIPTION": "System Prompt Designer",
|
||||||
"AGENT_2_NAME": "Morgan",
|
"CUSTOM_AGENT_WEBHOOK": "https://n8n.biohazardvfx.com/webhook-test/7cbdc539-526f-425f-abea-0886ec4c1e76",
|
||||||
"AGENT_2_DESCRIPTION": "System Prompt Designer",
|
"IMAGE_UPLOADS_ENABLED": "true",
|
||||||
"IMAGE_UPLOADS_ENABLED": "true",
|
"DIFF_TOOL_ENABLED": "true"
|
||||||
"DIFF_TOOL_ENABLED": "true"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"assets": {
|
"assets": {
|
||||||
"binding": "ASSETS",
|
"binding": "ASSETS",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user