Repository navigation
Serve trybilly.tech from the billy Worker - #50
Merged
Merged
Conversation
The Worker already serves the whole static export on workers.dev. A routes block points trybilly.tech and www.trybilly.tech at it, so requests stop reaching the Vercel origin; the apex-to-www redirect moves to a dashboard Redirect Rule. docs/deploy.md covers the pipeline, the rule and rollback.
Workers Builds builds and deploys main, wrangler.jsonc routes the two production hostnames, and docs/deploy.md documents the dashboard steps and rollback.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
📒 Files selected for processing: 4
✨ Finishing Touches
Comment |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Moves production serving from Vercel to the
billyWorker, which already serves the full static export onbilly.vedantlavale.workers.dev.wrangler.jsoncgains aroutesblock fortrybilly.tech/*andwww.trybilly.tech/*, so at deploy both hostnames are answered by the Worker and requests stop reaching the Vercel origin. No code changes.Vercel stays as the pull-request preview builder and as a hot standby: its production domains are left attached, so rollback is removing the
routesblock and redeploying.Why now
The
/mcpendpoint in #49 needs the Worker on the real hostname for/connectto hand out a working address.trybilly.tech/mcpis 404 on Vercel, and a static export cannot serve it.Evidence
Before:
curl -sI https://www.trybilly.tech/carriesx-vercel-id(the Vercel origin); the Worker answers only on workers.dev.On this branch (pre-merge):
wrangler deploy --dry-run: reads 143 asset files, exits clean.trybilly.tech(zone88006387838f8deb71d9d94a5ff8041a) is in the Worker's account (98f49cad1636a4072e05b3b76d526bbe), so the routes resolve.wrangler dev(port 8790):/200,/editor200,/early-birds200, unknown path 404,_headersapplied (x-frame-options: DENY).https://46135d16-billy.vedantlavale.workers.devserves/200,/editor200,/early-birds200, the 404 page, and the headers.After merge:
maingoes green and attaches the routes (in this wrangler version, routes are triggers applied at deploy).curl -sI https://www.trybilly.tech/no longer carriesx-vercel-id./,/editor, and once MCP: let AI assistants build invoices (endpoint, CLI, /connect page) #49 lands/connectand/mcp, work onwww.trybilly.tech.One unknown that only shows at merge: whether the Workers Builds deploy token may manage zone routes. If the main build fails on that, I attach the routes with a local
wrangler deploy(this token hasworkers_routes: write).After merge (dashboard, optional)
The apex 308 to www was Vercel's. To keep it, add one Redirect Rule: zone
trybilly.tech-> Rules -> Redirect Rules ->http.host eq "trybilly.tech"-> redirect tohttps://www.trybilly.tech, keep path and query, 308. Without it the apex serves the site directly. Steps indocs/deploy.md.Checks
bun run buildOK (7.3s).(cd apps/web && bunx tsc --noEmit)clean.(cd packages/invoice-core && bunx tsc --noEmit)only the knownbun:testtype noise.(cd packages/invoice-core && bun test)20 pass, 0 fail. The app has no tests.bun run lint: the documented baseline error inapps/web/scripts/download-fonts.ts(no-explicit-any) plus 5 pre-existing warnings; this PR adds none.Review note
Touches
wrangler.jsoncandAGENTS.md, which #49 also edits in different regions. Whichever merges second needs a small rebase; I handle it. No issue to close.Summary by CodeRabbit