forked from RC219805/Transformation_Portal
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
75 lines (62 loc) · 3.45 KB
/
Copy path.env.example
File metadata and controls
75 lines (62 loc) · 3.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# Transformation Portal — environment variables (template)
#
# Copy this file to `.env` and fill in real values before running
# `docker compose up`. The .env file is gitignored. The compose file references
# `.env` with `required: false`, so missing entries fall back to in-code defaults
# — but you almost certainly want to set TP_API_KEY in any non-throwaway run.
#
# Inventory below covers Python-orchestrator env vars sourced from `os.getenv(...)`
# and `_env_bool(...)` calls in app.py. Run this (POSIX-portable, works on
# GNU/BSD grep) to refresh:
#
# grep -oE '(getenv|_env_bool)\("[A-Z][A-Z0-9_]+"' app.py | sort -u
#
# A few entries below (notably DEVICE) are not read by the Python package —
# they're consumed by the Dockerfile / docker-compose orchestration layer.
# Each such entry is annotated with where it's actually read.
# ---------------------------------------------------------------------------
# Secrets
# ---------------------------------------------------------------------------
# Shared secret for /v1 protected endpoints. When unset AND TP_ENFORCE_JOB_API_KEY
# is true (the default), the orchestrator returns 503 AUTH_CONFIGURATION_ERROR
# for protected routes. Generate with:
# python -c "import secrets; print(secrets.token_urlsafe(32))"
TP_API_KEY=
# Whether protected /v1 endpoints enforce the API key. Default in app.py: true.
# Set to "false" only for development against an unauthenticated orchestrator.
# TP_ENFORCE_JOB_API_KEY=true
# HTTP header carrying the API key. Default: x-api-key. Lower-case, single token.
# TP_API_KEY_HEADER=x-api-key
# ---------------------------------------------------------------------------
# Runtime
# ---------------------------------------------------------------------------
# Hardware device. One of: cpu | cuda | mps.
# Read by: docker-compose.yml (passed into the container as $DEVICE) and the
# Dockerfile's `ENV DEVICE=...` defaults. NOT read by app.py or any Python
# module today — the Python orchestrator picks the device from torch
# auto-detection. If you bypass docker compose, this variable has no effect.
DEVICE=cpu
# Override interpreter used to launch the DA3 depth subprocess. Most deploys
# leave this unset and the orchestrator picks `python3` from PATH.
# TRANSFORMATION_PORTAL_DA3_PYTHON=
# ---------------------------------------------------------------------------
# Portal surface
# ---------------------------------------------------------------------------
# Filesystem root for staged multipart uploads. Default: <tmpdir>/transformation-portal/uploads.
# Use a tmpfs/ramdisk in production for I/O headroom.
# TP_PORTAL_UPLOAD_ROOT=
# Override the default Content-Security-Policy served with portal.html.
# Empty/unset uses DEFAULT_CSP from app.py.
# TP_CSP=
# Append-only audit log for portal events (job lifecycle, dispatch, etc.).
# Unset disables file logging; events still go to stdout via the Python logger.
# TP_PORTAL_EVENT_LOG_PATH=
# Append-only RUM telemetry log (browser-reported metrics).
# TP_PORTAL_RUM_LOG_PATH=
# ---------------------------------------------------------------------------
# Rollout / feature gates (TP_PORTAL_*)
# ---------------------------------------------------------------------------
# The portal exposes ~dozens of TP_PORTAL_* boolean / percentage gates for
# rolling out UI features and experiments. They are intentionally not listed
# here because the set churns; grep `TP_PORTAL_` in app.py for the live list
# and consult docs/governance/ for the rollout policy.