104 lines
4.4 KiB
Plaintext
104 lines
4.4 KiB
Plaintext
# =============================================================================
|
|
# OTel BI Platform — master environment reference
|
|
#
|
|
# For Docker Compose: copy to .env in the project root.
|
|
# For local dev: each service reads its own subset — see comments below.
|
|
#
|
|
# POSTGRES_DSN for the Go analytics service is constructed in docker-compose.yml
|
|
# from the individual POSTGRES_* vars below — do not duplicate the password here.
|
|
# =============================================================================
|
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# PostgreSQL — shared by both backend services
|
|
# Change POSTGRES_PASSWORD here and update it in POSTGRES_DSN below.
|
|
# -----------------------------------------------------------------------------
|
|
POSTGRES_PASSWORD=changeme
|
|
POSTGRES_HOST=postgres
|
|
POSTGRES_PORT=5432
|
|
POSTGRES_DATABASE=otel_bi
|
|
POSTGRES_USERNAME=otel_bi
|
|
POSTGRES_SSLMODE=prefer
|
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Go analytics service (otel-bi-analytics) → backend/analytics/
|
|
# -----------------------------------------------------------------------------
|
|
|
|
# MSSQL data warehouses — required
|
|
# sqlserver://user:pass@host:port?database=name&TrustServerCertificate=true&ApplicationIntent=ReadOnly
|
|
AW_MSSQL_DSN=sqlserver://sa:YourStrongPassword123!@host.docker.internal:1433?database=AdventureWorksDW2022&TrustServerCertificate=true&ApplicationIntent=ReadOnly
|
|
WWI_MSSQL_DSN=sqlserver://sa:YourStrongPassword123!@host.docker.internal:1433?database=WideWorldImportersDW&TrustServerCertificate=true&ApplicationIntent=ReadOnly
|
|
|
|
# POSTGRES_DSN is assembled by docker-compose.yml from the vars above:
|
|
# postgresql://${POSTGRES_USERNAME}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DATABASE}?sslmode=${POSTGRES_SSLMODE}
|
|
# For local dev without Compose, export POSTGRES_DSN manually in your shell.
|
|
|
|
# HTTP port (default 8080)
|
|
# PORT=8080
|
|
|
|
# Analytics tuning — all optional
|
|
# DEFAULT_TOP_N=10
|
|
# FORECAST_HORIZON_DAYS=30
|
|
# DEFAULT_HISTORY_DAYS=365
|
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Python API (otel-bi-api) → backend/
|
|
# -----------------------------------------------------------------------------
|
|
|
|
# URL of the Go analytics service
|
|
ANALYTICS_SERVICE_URL=http://analytics:8080
|
|
|
|
# PostgreSQL — reads the individual POSTGRES_* vars defined above
|
|
|
|
# Comma-separated allowed CORS origins
|
|
CORS_ORIGINS=http://localhost:8080
|
|
|
|
# JWT validation for incoming browser requests
|
|
# Set false only for local dev — always true in production
|
|
REQUIRE_FRONTEND_AUTH=false
|
|
# FRONTEND_JWT_ISSUER_URL=https://sso.example.com/realms/otel-bi
|
|
# FRONTEND_JWT_AUDIENCE=otel-bi-api
|
|
# FRONTEND_JWT_JWKS_URL=https://sso.example.com/realms/otel-bi/protocol/openid-connect/certs
|
|
# FRONTEND_REQUIRED_SCOPES=openid profile
|
|
|
|
# OIDC client config — served to the SPA at runtime via GET /api/config
|
|
# NOT baked into the frontend image
|
|
# FRONTEND_OIDC_CLIENT_ID=otel-bi-frontend
|
|
# FRONTEND_OIDC_SCOPE=openid profile email
|
|
|
|
# Path for generated full-report XLSX + PDF files
|
|
# Mount a PVC here in Kubernetes
|
|
REPORT_OUTPUT_DIR=/reports
|
|
|
|
APP_ENV=prod
|
|
LOG_LEVEL=INFO
|
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# OpenTelemetry — shared collector endpoint
|
|
# Used by Go analytics + Python API for their own trace/metric export.
|
|
# In-cluster K8s DNS for Alloy.
|
|
# -----------------------------------------------------------------------------
|
|
OTEL_COLLECTOR_ENDPOINT=http://alloy:4318
|
|
OTEL_SERVICE_NAMESPACE=final-thesis
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Frontend telemetry — served to the SPA via GET /api/config.
|
|
# These are the values the browser-side OTel SDK uses; the SPA reads them at
|
|
# runtime so a single frontend image works across all environments.
|
|
# -----------------------------------------------------------------------------
|
|
|
|
# Browser-reachable OTLP endpoint. Distinct from OTEL_COLLECTOR_ENDPOINT
|
|
# because the browser can't reach in-cluster service DNS.
|
|
# Default `/otel` assumes Ingress routes `/otel/v1/traces` → alloy:4318.
|
|
# Set to an absolute URL (e.g. https://alloy.example.com) if exposing the
|
|
# collector on its own host instead.
|
|
FRONTEND_OTEL_COLLECTOR_ENDPOINT=/otel
|
|
|
|
# OTel resource attributes for the frontend service
|
|
FRONTEND_OTEL_SERVICE_NAME=otel-bi-frontend
|
|
FRONTEND_OTEL_SERVICE_NAMESPACE=final-thesis
|
|
FRONTEND_DEPLOYMENT_ENVIRONMENT=production
|