mirror of
https://github.com/djdevin/recflare.git
synced 2026-09-09 07:01:27 -07:00
fix service subdomains env var not working
This commit is contained in:
+11
-4
@@ -7,11 +7,18 @@ discover every service host (Accounts, API, Auth, Econ, Matchmaking,
|
||||
Notifications, …).
|
||||
|
||||
Each host is built at runtime from the `DOMAIN` var (the base domain) plus the
|
||||
service → subdomain map in `src/endpoints.ts`. `DOMAIN` is injected at deploy
|
||||
time from `RECFLARE_DOMAIN` (see `run-wrangler-deploy`) and defaults to
|
||||
`rec.example.com` in `wrangler.jsonc` for local dev.
|
||||
service → subdomain map in `src/endpoints.ts`, with the `SUBDOMAINS` var applied
|
||||
on top. Both vars are injected at deploy time from `RECFLARE_DOMAIN` and
|
||||
`RECFLARE_SUBDOMAINS` (see `run-wrangler-deploy`) and default to
|
||||
`rec.example.com` / `{}` in `wrangler.jsonc` for local dev.
|
||||
|
||||
## Updating endpoints
|
||||
|
||||
- To change the base domain, set `RECFLARE_DOMAIN` (in `.env`) and redeploy.
|
||||
- To add or rename a service host, edit the map in `src/endpoints.ts`.
|
||||
- To point one service at a different host, add it to `RECFLARE_SUBDOMAINS` (in
|
||||
`.env`) and redeploy. It's keyed by the service's _default_ subdomain — the
|
||||
same object `run-wrangler-deploy` reads to pick a worker's host, so an entry
|
||||
moves the deployed worker and the advertised host together. An entry for a
|
||||
service with no worker (e.g. `{"moderation":"api"}`) is a pure client-side
|
||||
redirect onto a host another worker already serves.
|
||||
- To add or rename a service, edit the map in `src/endpoints.ts`.
|
||||
|
||||
Reference in New Issue
Block a user