Repository navigation
Expand file tree
/
Copy path.env.example
More file actions
51 lines (46 loc) · 2.63 KB
/
Copy path.env.example
File metadata and controls
51 lines (46 loc) · 2.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Next.js portal config. Copy to .env for local dev.
#
# Browser-facing values use the NEXT_PUBLIC_ADMIN_* prefix (Next inlines them
# into the client bundle). Server-only values are NEVER shipped to the browser.
#
# The browser NEVER talks to the gateway directly. It calls the same-origin
# server proxy at /api/proxy/{hub|api}/..., and the backend re-targets to the
# real Hub/API (the server-only vars below). So there is NO browser-facing
# Hub/API host to set — only the server-side ones.
# Brand + auth config mode:
# dynamic (default) — start from neutral defaults, fetch the project's brand
# + auth config from the public endpoint, and override.
# static — load brand + auth ENTIRELY from a bundled per-project
# config; never call the endpoint. (Static config is a
# Vite-only feature and is unavailable under Next.)
NEXT_PUBLIC_ADMIN_CONFIG_MODE=dynamic
# Optional: pin the project id. Resolution order:
# 1. NEXT_PUBLIC_ADMIN_PROJECT_ID (this) — self-hosted / custom-domain builds.
# 2. the pr_{base62} subdomain — managed multi-tenant (pr_x.admin.norbix.ai).
# 3. a custom domain — resolved by asking the managed service.
NEXT_PUBLIC_ADMIN_PROJECT_ID=
# ── Server-only (never reaches the browser) ─────────────────────────
# The Hub/API the portal backend calls server-side. If unset, the proxy falls
# back to hub.norbix.ai / api.norbix.ai. The service-user API key is used ONLY
# for the privileged roles + marketing-preference catalogs served by
# /api/bootstrap — never forwarded on user proxy calls.
API_KEY=
HUB_BASE_URL=https://hub.norbix.ai
API_BASE_URL=https://api.norbix.ai
HUB_VERSION=v3
API_VERSION=v3
# Self-hosted: the project this portal serves (pr_{base62} or pr-{32 hex}).
# Read at RUNTIME by the server and emitted as <meta name="norbix-project">,
# so a published image needs no rebuild per customer. Unset = managed (the
# project comes from the pr-<hex> host label).
PROJECT_ID=
# Optional Norbix environment (self-hosted only). Unset = PROD.
# Set to "staging" or "test" to target that project environment; the backend
# sends it as the norbix-env header on every request. Managed deployments
# derive the environment from the host (e.g. test.pr_x.admin.norbix.ai).
# ENV=staging
#
# There is NO mode flag. The portal backend decides self-hosted vs managed from
# whether API_KEY is set: API_KEY present → self-hosted (call the public Hub
# endpoint with the key); API_KEY absent → managed (call the private internal
# endpoint, no key). A managed deployment never holds a per-project key.