Daniarosa/procurement-twin
0
1# Procurement Digital Twin — Environment Variables2# Copy to .env and fill in values before starting.3# All variables have sensible defaults for local development.4 5# ── Security ───────────────────────────────────────────────────────────────6# Comma-separated list of valid API keys for the REST API.7# Leave empty to disable authentication (development only).8# Generate a key: python -c "import secrets; print(secrets.token_urlsafe(32))"9API_KEYS=10 11# Required: Jupyter notebook access token.12# Generate: openssl rand -hex 3213JUPYTER_TOKEN=14 15# ── CORS ────────────────────────────────────────────────────────────────────16# Comma-separated list of allowed origins for the REST API.17# Defaults to localhost:8050 and localhost:8888 if not set.18CORS_ORIGINS=http://localhost:8050,http://localhost:888819 20# ── Rate limiting ───────────────────────────────────────────────────────────21# slowapi-style limit string: "<count>/<period>"22# Periods: second, minute, hour, day23RATE_LIMIT=60/minute24 25# ── Request timeout ─────────────────────────────────────────────────────────26# Max seconds before the API returns HTTP 504.27# Increase if running /policy with n_records=2000.28API_TIMEOUT_SECONDS=12029 30# ── Simulation cache ────────────────────────────────────────────────────────31# Set CACHE_ENABLED=0 to disable the LRU cache entirely.32CACHE_ENABLED=133CACHE_MAXSIZE=50034CACHE_TTL=360035 36# ── Simulation history (audit log) ──────────────────────────────────────────37# SQLite database path. Use a volume-mounted path for persistence.38# Default :memory: means history is lost on restart.39HISTORY_DB_PATH=/app/data/history.db40HISTORY_MAX_ROWS=1000041 42# ── Concurrency ─────────────────────────────────────────────────────────────43# Number of threads dedicated to long-running /policy and /benchmark calls.44POLICY_WORKERS=245 46# ── File paths ──────────────────────────────────────────────────────────────47# Override default relative paths for model and feature store files.48# MODEL_DIR=/app/models49# FEAT_DIR=/app/data/features50# DATA_DIR=/app/data51 52# ── Hugging Face Hub ─────────────────────────────────────────────────────────53# Used by start.py to download model artifacts at container startup.54# HF_HOME=/home/user/.cache/huggingface55# HF_REPO_ID=your-org/procurement-twin56 57# ── Jupyter (docker-compose only) ───────────────────────────────────────────58# Internal API base URL for notebooks running inside the Docker network.59TWIN_API_BASE=http://api:800060 