system-adminUpdated 2026-04-17

Configure Environment Variables

What this covers

The complete reference for all environment variables accepted by Tessallite. Also covers how to set variables in Docker Compose and Cloud Run, and how to keep secrets out of source control.

Variable reference

VariableRequiredDefaultServicesDescription
DB_HOSTYespostgresAll except gatewayHostname of the internal PostgreSQL instance. In Docker Compose, use the service name postgres. On GCP, use the Cloud SQL private IP or 127.0.0.1 with Auth Proxy.
DB_PORTNo5432All except gatewayPort of the internal PostgreSQL instance.
DB_NAMENotessalliteAll except gatewayDatabase name in the internal PostgreSQL instance.
DB_USERYesAll except gatewayPostgreSQL username.
DB_PASSYesAll except gatewayPostgreSQL password. Do not commit to source control.
ADMIN_USERYesfrontendSystem Admin username for initial login to the web UI.
ADMIN_PASSYesfrontendSystem Admin password.
SESSION_SECRETYesfrontendRandom string used to sign session tokens. Minimum 32 characters. No default — service will not start without this set.
GATEWAY_PORT_JDBCNo5433gatewayPort on which gateway listens for JDBC connections.
GATEWAY_PORT_XMLANo8080gatewayPort on which gateway listens for XMLA connections.
FRONTEND_PORTNo3000frontendPort on which the web UI is served.
OPTIMIZER_SCORE_THRESHOLDNo50optimizerMinimum ROI score required before optimizer surfaces a build recommendation. Integer, 0–100.
SCHEDULER_MAX_CONCURRENTNo3schedulerMaximum number of aggregate build jobs running simultaneously.
LOG_LEVELNoinfoAllLog verbosity. Accepted values: debug, info, warn, error.

Setting variables in Docker Compose

Create a .env file in the same directory as docker-compose.yml:

DB_HOST=postgres
DB_PORT=5432
DB_NAME=tessallite
DB_USER=tessallite
DB_PASS=changeme
ADMIN_USER=admin
ADMIN_PASS=changeme
SESSION_SECRET=your-random-secret-here

Docker Compose reads this file automatically. Alternatively, set variables in the environment: block of each service in docker-compose.yml for non-secret values.

Setting variables in Cloud Run

Via the CLI:

gcloud run services update SERVICE_NAME \
  --region REGION \
  --set-env-vars LOG_LEVEL=info,OPTIMIZER_SCORE_THRESHOLD=50 \
  --update-secrets DB_PASS=tessallite-db-pass:latest,SESSION_SECRET=tessallite-session-secret:latest

Via the console: Open the Cloud Run service, select Edit and Deploy New Revision, then open the Variables and Secrets tab.

Security

Never commit DB_PASS, ADMIN_PASS, or SESSION_SECRET to source control. Add .env to .gitignore. On GCP, use Secret Manager for all credential values rather than embedding them in the Cloud Run service definition.

Related