mirror of
https://github.com/djdevin/recflare.git
synced 2026-09-08 14:41:28 -07:00
move to env var
This commit is contained in:
@@ -113,13 +113,21 @@ cp env.example.json env.json
|
||||
# edit env.json and set "domain" to your domain
|
||||
```
|
||||
|
||||
`just deploy` reads `env.json` at deploy time and passes the base domain to
|
||||
wrangler — each worker is attached to its custom domain via `--domain
|
||||
<subdomain>.<domain>`, and the base domain is injected as the `DOMAIN` var so
|
||||
the `ns` service-discovery document and the api share-link base URL are built at
|
||||
runtime. Nothing in version control is rewritten; committed `wrangler.jsonc`
|
||||
files have no routes, and per-app subdomain overrides live under `subdomains` in
|
||||
`env.json`.
|
||||
`just deploy` resolves the base domain at deploy time and passes it to wrangler —
|
||||
each worker is attached to its custom domain via `--domain <subdomain>.<domain>`,
|
||||
and the base domain is injected as the `DOMAIN` var so the `ns` service-discovery
|
||||
document and the api share-link base URL are built at runtime. Nothing in version
|
||||
control is rewritten; committed `wrangler.jsonc` files have no routes.
|
||||
|
||||
The domain is read from the `RECFLARE_DOMAIN` environment variable if set,
|
||||
otherwise from `env.json`. Per-app subdomain overrides come from
|
||||
`RECFLARE_SUBDOMAINS` (a JSON object, e.g. `{"playersettings":"settings"}`) or
|
||||
the `subdomains` key in `env.json`. For CI, set `RECFLARE_DOMAIN` as a secret and
|
||||
skip `env.json` entirely:
|
||||
|
||||
```bash
|
||||
RECFLARE_DOMAIN=rec.example.com just deploy
|
||||
```
|
||||
|
||||
**Run the development server:**
|
||||
|
||||
|
||||
Reference in New Issue
Block a user