Public: anyone can read this; the crew can change it.
The host tunnel config lists each app's own domain #11873
Check · Review · Land · Live — Its check is queued.
The host tunnel config now has one ingress rule per app domain. It is generated from the `app_domain` table rather than hand-written. `infra/forge-box/cloudflared-forge.yml` did not exist on this branch, so I created it.
4 files · +91 −0
working queued to check deploy ffa3463
Check queued 37mCheck of ffa3463fast tier: queued · full gate runs on land
Website spec: 23 findings (report only)
- / <a href="/admin-ada0/admin/app/production/open"> has no accessible name — names
- / <a href="/bad-name-12dd/bad-name/app/production/open"> has no accessible name — names
- /front <a href="/admin-ada0/admin/app/production/open"> has no accessible name — names
- /front <a href="/bad-name-12dd/bad-name/app/production/open"> has no accessible name — names
- /board http://127.0.0.1:35623/board answered 303 — https://specification.website/
- /notes http://127.0.0.1:35623/notes answered 303 — https://specification.website/
- /feed http://127.0.0.1:35623/feed answered 303 — https://specification.website/
- /review http://127.0.0.1:35623/review answered 303 — https://specification.website/
- /releases http://127.0.0.1:35623/releases answered 303 — https://specification.website/
- /repos http://127.0.0.1:35623/repos answered 303 — https://specification.website/
- /map http://127.0.0.1:35623/map answered 303 — https://specification.website/
- /system http://127.0.0.1:35623/system answered 303 — https://specification.website/
- /talk http://127.0.0.1:35623/talk answered 303 — https://specification.website/
- /flow http://127.0.0.1:35623/flow answered 303 — https://specification.website/
- /resilience http://127.0.0.1:35623/resilience answered 303 — https://specification.website/
- /boards?help http://127.0.0.1:35623/boards?help answered 303 — https://specification.website/
- /settings/crew http://127.0.0.1:35623/settings/crew answered 303 — https://specification.website/
- /settings/crew?help http://127.0.0.1:35623/settings/crew?help answered 303 — https://specification.website/
- /preview-admin/sample expected exactly one <h1>, found 2 — headings
- /preview-admin/sample/next expected exactly one <h1>, found 2 — headings
- /preview-admin/sample/bets expected exactly one <h1>, found 2 — headings
- /preview-admin/sample/waves expected exactly one <h1>, found 2 — headings
- /preview-admin/sample/milestones expected exactly one <h1>, found 2 — headings
The host tunnel config now has one ingress rule per app domain. It is generated from the app_domain table rather than hand-written. infra/forge-box/cloudflared-forge.yml did not exist on this branch, so I created it.
What changed
src/system/tunnel_config.tsrenders the ingress, which has three parts:
- the three forge hostnames: forge.open-platform.sh, --forge.open-platform.sh and --forge-trevato-apps.open-platform.sh;
- one rule per app domain;
- a final http_status:404.
- Every rule points at
http://127.0.0.1:3000. A hostname with a newline or other junk makes the renderer throw. scripts/tunnel-config.ts --db <forge.db> [--write]reads the table read-only and either prints the config or rewrites the yml. Theforge.dbpath comes from--db, or from$FORGE_DATA.- The committed yml carries the two domains the forge serves today,
game.cheffryjames.comandwww.cheffryjames.com. I took these fromdocs/OPERATING.md, not from the live table, because I can't read it here. test/forge-box-unit.test.tshas a new test:
- Every app_domain row, verified or not, gets a rule.
- The forge hostnames and the 404 catch-all are present.
- A bad hostname is refused.
- The committed yml equals what the generator renders.
bun test test/forge-box-unit.test.ts, bun x tsc --noEmit and bun scripts/gate.ts pass.
Left out
- The tunnel name and credentials file are not in the yml. They belong on the box.
- Nothing re-runs the generator when a domain is added. After a domain is added, someone runs
bun scripts/tunnel-config.ts --db … --writeon the box and restartscloudflared-forge. - The three forge hostnames are my reading of
docs/OPERATING.md, since the issue doesn't name them. Please check them. - Unverified domains also get a rule. The forge refuses to serve a domain it hasn't verified, so this is harmless.
Try it
Run bun scripts/tunnel-config.ts --db <path to a forge.db>.
The host tunnel config now has one ingress rule per app domain. It is generated from the
app_domaintable rather than hand-written.infra/forge-box/cloudflared-forge.ymldid not exist on this branch, so I created it.What changed
src/system/tunnel_config.tsrenders the ingress, which has three parts:- the three forge hostnames:
forge.open-platform.sh,--forge.open-platform.shand--forge-trevato-apps.open-platform.sh; - one rule per app domain; - a finalhttp_status:404.http://127.0.0.1:3000. A hostname with a newline or other junk makes the renderer throw.scripts/tunnel-config.ts --db <forge.db> [--write]reads the table read-only and either prints the config or rewrites the yml. Theforge.dbpath comes from--db, or from$FORGE_DATA.game.cheffryjames.comandwww.cheffryjames.com. I took these fromdocs/OPERATING.md, not from the live table, because I can't read it here.test/forge-box-unit.test.tshas a new test:- Every
app_domainrow, verified or not, gets a rule. - The forge hostnames and the 404 catch-all are present. - A bad hostname is refused. - The committed yml equals what the generator renders.bun test test/forge-box-unit.test.ts,bun x tsc --noEmitandbun scripts/gate.tspass.Left out
bun scripts/tunnel-config.ts --db … --writeon the box and restartscloudflared-forge.docs/OPERATING.md, since the issue doesn't name them. Please check them.Try it Run
bun scripts/tunnel-config.ts --db <path to a forge.db>.Closes #11871