The repository had no container image and no production-shaped serving configuration. `dist/server.mjs` is a preview server that applies neither the security headers nor the cache policy `config/hosting/` declares, so a deployment had nothing correct to run. `scripts/generate-nginx-config.ts` derives the server block from `dist/tech-log-serving-contract.json` plus the two hosting policy files, so the served headers and cache lifetimes cannot drift from what the contract declares. It emits no TLS and no proxy blocks: the edge terminates TLS and routes /api, and baking a backend address into the image would tie the bundle to one deployment. Static surfaces use `alias` because a base-path build serves /dev/assets/... out of dist/assets/..., which `root` plus URI would look for one directory too deep. The image copies that config next to the bundle and normalises permissions: the build writes config.json 0600, which nginx cannot read, so the container came up healthy and answered 403 for the one file the SPA needs to boot. index.html never referenced public/favicon.svg. The file shipped and nginx served it, but browsers asked for /favicon.ico, got a 404, and fell back to the default icon. `%BASE_URL%` rather than an absolute path so a prefixed deployment points at its own copy. development.json moves to the HTTP Studio source; the mock source has no backend to authenticate against, which is the whole point of that profile.
21 lines
539 B
JSON
21 lines
539 B
JSON
{
|
|
"APP_ENV": "development",
|
|
"API_BASE_URL": "https://api.dev.example.com/",
|
|
"REQUEST_TIMEOUT_MS": 15000,
|
|
"MAX_RETRY_ATTEMPTS": 2,
|
|
"TELEMETRY_ENABLED": false,
|
|
"AUTH_MODE": "external",
|
|
"CONFIG_SCHEMA_VERSION": "2.0",
|
|
"RELEASE_MANIFEST_URL": "/release-manifest.json",
|
|
"CAPABILITY_OVERRIDES": {
|
|
"REALTIME": "DEFAULT",
|
|
"WEB_WORKER": "DEFAULT",
|
|
"SERVICE_WORKER": "DEFAULT",
|
|
"OFFLINE_COMMANDS": "DEFAULT"
|
|
},
|
|
"TECH_LOG_STUDIO_SOURCE": "HTTP",
|
|
"FEATURE_OVERRIDES": {
|
|
"reference-feature": "DEFAULT"
|
|
}
|
|
}
|