The logo/favicon upload succeeded, but the check that the site can show it got a 404: on events-demo every /api/... path ending in a file extension (.png, .ico, .pdf, .json) went to Next.js instead of the backend. - next.config.ts: /api/* and /uploads/* that reach the site are passed to the backend (beforeFiles rewrites) via the new BACKEND_INTERNAL_URL (http://127.0.0.1:<apiPort>, from env.template.json on deploy). The e2e E2E_API_PROXY uses the same rewrites. - nginx written by both installers and shown in DEPLOYMENT.md: /api/ and /uploads/ use location ^~ so no regex location can take them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
121 lines
3.1 KiB
JSON
121 lines
3.1 KiB
JSON
{
|
|
"schema": "crosscode.env-template/1",
|
|
"product": "events",
|
|
"files": {
|
|
"backend/.env": [
|
|
{
|
|
"name": "NODE_ENV",
|
|
"layer": "generated",
|
|
"required": true,
|
|
"description": "production"
|
|
},
|
|
{
|
|
"name": "PORT",
|
|
"layer": "install",
|
|
"from": "{apiPort}",
|
|
"required": true,
|
|
"description": "The backend's port (from the Hub's port list)"
|
|
},
|
|
{
|
|
"name": "DATABASE_URL",
|
|
"layer": "generated",
|
|
"required": true,
|
|
"description": "Made on the server with a new password; never leaves it"
|
|
},
|
|
{
|
|
"name": "JWT_SECRET",
|
|
"layer": "generated",
|
|
"required": true,
|
|
"description": "Also encrypts stored secrets: never change it"
|
|
},
|
|
{
|
|
"name": "FRONTEND_URL",
|
|
"layer": "install",
|
|
"from": "https://{domain}",
|
|
"required": true
|
|
},
|
|
{
|
|
"name": "APP_BASE_URL",
|
|
"layer": "install",
|
|
"from": "https://{domain}",
|
|
"required": true
|
|
},
|
|
{
|
|
"name": "BACKEND_URL",
|
|
"layer": "install",
|
|
"from": "https://{domain}",
|
|
"required": true,
|
|
"description": "The same address: the backend is under /api (2.2.0+)"
|
|
},
|
|
{
|
|
"name": "TRUST_PROXY",
|
|
"layer": "server",
|
|
"required": true,
|
|
"description": "Behind frp: loopback"
|
|
},
|
|
{
|
|
"name": "APP_TIMEZONE",
|
|
"layer": "install",
|
|
"default": "Africa/Johannesburg"
|
|
},
|
|
{
|
|
"name": "HUB_URL",
|
|
"layer": "defaults",
|
|
"default": "https://hub.crosscode.co.za"
|
|
},
|
|
{
|
|
"name": "HUB_HEARTBEAT_ENABLED",
|
|
"layer": "defaults",
|
|
"default": "true"
|
|
},
|
|
{
|
|
"name": "HUB_PUBLIC_KEY",
|
|
"layer": "defaults",
|
|
"description": "Only for a Hub other than hub.crosscode.co.za (staging, a test VM): its licence public key"
|
|
},
|
|
{
|
|
"name": "HUB_LICENCE_KEY",
|
|
"layer": "install",
|
|
"description": "With it the site registers with the Hub by itself when it first starts"
|
|
},
|
|
{
|
|
"name": "HUB_ADMIN_NAME",
|
|
"layer": "install",
|
|
"description": "The site admin, sent to the Hub on registering"
|
|
},
|
|
{
|
|
"name": "HUB_ADMIN_EMAIL",
|
|
"layer": "install"
|
|
},
|
|
{
|
|
"name": "BACKUP_ENABLED",
|
|
"layer": "defaults",
|
|
"default": "true"
|
|
},
|
|
{
|
|
"name": "DAILY_SUMMARY_ENABLED",
|
|
"layer": "defaults",
|
|
"default": "true"
|
|
},
|
|
{
|
|
"name": "SENTRY_DSN",
|
|
"layer": "defaults"
|
|
}
|
|
],
|
|
"frontend/.env.production": [
|
|
{
|
|
"name": "NEXT_PUBLIC_API_URL",
|
|
"layer": "install",
|
|
"from": "https://{domain}",
|
|
"required": true
|
|
},
|
|
{
|
|
"name": "BACKEND_INTERNAL_URL",
|
|
"layer": "install",
|
|
"from": "http://127.0.0.1:{apiPort}",
|
|
"description": "The backend on this server: requests for /api or /uploads that reach the site are passed to it (3.6.1)"
|
|
}
|
|
]
|
|
}
|
|
}
|