Skip to main content
Version: Next

Environment Variables

Backend

Copy backend/.env.example to backend/.env for local development. In production, pass these as Kubernetes env: / envFrom: from a Secret.

Core

VariableDefaultRequiredDescription
PORT8080HTTP listen port
FRONTEND_URLhttp://localhost:3000CORS allowed origin
SESSION_SECRET64 hex chars — openssl rand -hex 32
DEV_BYPASS_AUTHfalseSkip OIDC, auto-login as dev/platform-team. Dev only.

OIDC / Pinniped Supervisor

VariableDefaultRequiredDescription
OIDC_ISSUER_URLPinniped Supervisor FederationDomain issuer URL
OIDC_CLIENT_IDwxops-portalMust start with client.oauth.pinniped.dev-
OIDC_CLIENT_SECRETFrom OIDCClientSecretRequest
OIDC_REDIRECT_URIhttp://localhost:3000/auth/callbackMust match allowedRedirectURIs in OIDCClient CR
OIDC_SCOPESopenid,profile,email,groups,offline_access,pinniped:request-audiencepinniped:request-audience required for cluster token exchange
OIDC_CA_BUNDLE_FILEPath to PEM file for Supervisor TLS CA
OIDC_CA_BUNDLEInline PEM for Supervisor TLS CA
OIDC_TLS_SKIP_VERIFYfalseSkip TLS verification. Dev only.

Cluster Registry

VariableDefaultRequiredDescription
CLUSTERS_CONFIG_FILEPath to clusters.json — skips K8s Secret discovery
CLUSTERS_CONFIGInline JSON cluster list
KUBECONFIGPath to hub-cluster kubeconfig. Omit when running in-cluster.
CLUSTER_NAMESPACEwxops-systemNamespace where cluster Secrets are stored

Service Catalog

VariableDefaultRequiredDescription
GITEA_URL✅ (prod)Base URL — https://gitea.example.com
GITEA_TOKEN✅ (prod)Personal access token with repository read+write scope
GITEA_CATALOG_OWNER✅ (prod)Org or user that owns the gitops-infra repo
GITEA_CATALOG_REPOgitops-infraRepo name containing the service catalog
GITEA_CATALOG_PATHservice-catalogPath inside the repo where entity YAML files live
CATALOG_LOCAL_DIRLocal catalog dir for dev — overrides all GITEA_CATALOG_* vars

Scaffolding

VariableDefaultRequiredDescription
GITEA_TEMPLATE_OWNER(GITEA_CATALOG_OWNER)Org owning the scaffold template repo
GITEA_TEMPLATE_REPOscaffold-templatesRepo containing scaffold templates
GITEA_BOT_USERNAMECI bot username — added to main branch push whitelist
GITEA_BOT_EMAILCI bot email — substituted into scaffold CI template files
SCAFFOLD_LOCAL_DIRLocal template dir for dev

Vault

The portal only creates or updates secrets — never reads or deletes.

VariableDefaultRequiredDescription
VAULT_ADDRVault server address. When empty, Vault write is skipped.
VAULT_TOKENToken with wxops-portal policy
VAULT_KV_MOUNTsecretKV v2 mount path

CLI Download Proxy

VariableDefaultRequiredDescription
GITEA_PORTAL_OWNER(GITEA_CATALOG_OWNER)Org that owns the portal release repo
GITEA_PORTAL_REPOwxops-portal-v2Repo where wxops-* release binaries are attached

Runtime Observability

Added in v0.5.0. Every variable is optional — each unset value simply hides its feature. See Runtime Observability for what these drive.

VariableDefaultRequiredDescription
ARGOCD_URL(empty)ArgoCD base URL. Empty hides the ArgoCD buttons. Replaces the removed NEXT_PUBLIC_ARGOCD_URL.
ARGOCD_NAMESPACEargocdNamespace holding Application CRs
LGTM_GRAFANA_URL(empty)Grafana base URL. Empty hides all signal links.
LGTM_LOKI_DATASOURCELokiLoki datasource name or uid
LGTM_TEMPO_DATASOURCETempoTempo datasource name or uid
LGTM_PROMETHEUS_DATASOURCEprometheusPrometheus datasource uid — lowercase in kube-prometheus-stack
LGTM_PYROSCOPE_DATASOURCEPyroscopePyroscope datasource name or uid
ALERTMANAGER_URL(empty)Enables the active-alerts panel. The portal's only outbound call to an observability backend — leaving it unset disables both the panel and the egress.
# In-cluster Alertmanager with kube-prometheus-stack
ALERTMANAGER_URL=http://kube-prometheus-stack-alertmanager.monitoring.svc.cluster.local:9093
note

Enabling ALERTMANAGER_URL adds an outbound destination. Add the matching rule to the portal's egress NetworkPolicy.

Catalog Cache Webhook

VariableDefaultRequiredDescription
WEBHOOK_TOKENShared secret for Authorization: Bearer on POST /api/v1/webhooks/catalog/refresh
# Gitea → gitops-infra → Settings → Webhooks → Add
# URL: https://<portal-host>/api/v1/webhooks/catalog/refresh
# Header: Authorization: Bearer <WEBHOOK_TOKEN>
# Trigger: Push events

Frontend

Runtime variable

VariableDefaultDescription
BACKEND_URLhttp://localhost:8080Internal URL of the Go backend for Next.js SSR

Build-time variables

warning

These must be passed as --build-arg to docker build. Passing them at container runtime has no effect — the bundle is already sealed.

VariableBuild-argDefaultDescription
NEXT_PUBLIC_APP_VERSIONAPP_VERSION0.0.0Semver string baked into the portal UI version badge.
Removed in v0.5.0

NEXT_PUBLIC_ARGOCD_URL no longer exists. Use the backend variable ARGOCD_URL instead — it is read at runtime and served inside the API response, so changing the ArgoCD URL is a Deployment edit rather than an image rebuild. Drop the build-arg from your docker build and any CI wiring that passes it.

Secret management in production

envFrom:
- secretRef:
name: wxops-portal-secrets # created by ESO from Vault
env:
- name: FRONTEND_URL
value: "https://portal.example.com"