Configuration¶
The source of truth for environment settings is backend/.env.example. Do not commit credentials.
Database and application¶
NODE_ENV=production
DATABASE_HOST=postgres.example.internal
DATABASE_PORT=5432
DATABASE_NAME=KRYVEX
DATABASE_USER=KRYVEX
DATABASE_PASSWORD=change-me
DATABASE_PORT defaults to 5432. Use a dedicated database role with minimum required privileges.
Bootstrap administrator¶
These credentials create an initial administrator if no administrator exists; they do not overwrite an existing account. Restarting the backend invalidates existing admin sessions.
The optional npm --prefix backend run db:bootstrap command uses DATABASE_ADMIN_USER and DATABASE_ADMIN_PASSWORD. Do not provide database-superuser credentials to the normal runtime unless your deployment genuinely needs them.
League provider¶
# Default when omitted: opgg
LEAGUE_DATA_PROVIDER=opgg
# Alternatively:
# LEAGUE_DATA_PROVIDER=riot
# RIOT_API_KEY=your-api-key
Operational settings¶
TRUST_PROXYmust identify only trusted proxy IPs or CIDR ranges; avoid the broad valuetrue.METRICS_TOKENenables/metricsand requires Bearer authentication. When omitted, the endpoint is not registered.LOG_LEVELcontrols application logging (refer to the example file for allowed values).
Prefer secret management or orchestrator secrets for sensitive settings.