Environment Variables
Complete reference of all configuration variables across the AnyaSelf stack.
All environment variables can be set in the root .env file for Docker Compose, or injected individually per service deployment.
These variables are shared across all (or most) services:
| Variable | Default | Services | Description |
|---|
APP_ENV | dev | All | Runtime environment (dev, staging, prod) |
AUTH_JWT_SECRET | dev-secret-change-me | All | JWT signing secret (rejected in prod) |
AUTH_JWT_ALG | HS256 | All | JWT algorithm |
PERSISTENCE_BACKEND | inmemory | All | firestore or inmemory |
FIRESTORE_PROJECT_ID | — | All (firestore) | GCP project for Firestore (fallback: GOOGLE_CLOUD_PROJECT) |
FIRESTORE_DEV_FALLBACK_TO_INMEMORY | true | All (firestore) | Fall back to in-memory if Firestore unavailable in dev |
MEMBERSHIP_PROVIDER_BACKEND | none | All | firestore or none |
REQUIRE_MEMBERSHIP_PROVIDER | false | All | Crash if membership provider unavailable |
| Variable | Default | Services | Description |
|---|
ORCHESTRATOR_INTERNAL_TOKEN | dev-internal-token | orchestrator, hyperbeam-bridge, artifacts-audit | M2M auth for bridge events and artifact writes |
BUYFLOW_INTERNAL_TOKEN | dev-internal-token | api-gateway | M2M auth for cart-ready / failed transitions |
REQUIRE_INTERNAL_EVENT_TOKEN | true | orchestrator | Enforce token on /internal/ routes |
REQUIRE_BUYFLOW_INTERNAL_TOKEN | false | api-gateway | Enforce token on buy-flow internal endpoints |
| Variable | Default | Description |
|---|
AUTH_ACCESS_TOKEN_TTL_SECONDS | 3600 | Internal JWT lifetime |
AUTH_EXTERNAL_LOGIN_ENABLED | false | Enable OIDC external login |
AUTH_EXTERNAL_JWKS_URL | — | JWKS endpoint URL |
AUTH_EXTERNAL_ISSUER | — | Expected token issuer |
AUTH_EXTERNAL_AUDIENCE | — | Expected token audience |
AUTH_EXTERNAL_ALGORITHMS | RS256 | External token algorithm |
AUTH_EXTERNAL_REQUIRE_EXP | true (staging/prod) | Require expiry claim |
CHECKOUT_CONFIRMATION_TTL_SECONDS | 900 | Purchase confirmation token lifetime |
VOICE_LIVE_ENABLED | true (staging/prod) | Enable Gemini Live voice proxy |
VOICE_LIVE_API_KEY | — | Gemini API key |
VOICE_LIVE_MODEL | gemini-live-2.5-flash-native-audio | Voice model identifier |
VOICE_LIVE_SESSION_TTL_SECONDS | 300 | Authenticated voice session TTL |
VOICE_LIVE_PUBLIC_SESSION_ENABLED | true | Enable guest voice sessions |
VOICE_LIVE_PUBLIC_SESSION_TTL_SECONDS | 300 | Guest session TTL |
VOICE_LIVE_PUBLIC_RATE_LIMIT_WINDOW_SECONDS | 60 | Rate limit window |
VOICE_LIVE_PUBLIC_RATE_LIMIT_MAX_REQUESTS | 12 | Max public sessions per window |
VOICE_LIVE_PUBLIC_WS_BASE_URL | — | Optional external WSS URL override |
UNSPLASH_ENABLED | auto | Enabled when access key is set |
UNSPLASH_ACCESS_KEY | — | Unsplash API key for discover feed |
UNSPLASH_APP_NAME | anyaself | UTM attribution name |
UNSPLASH_TIMEOUT_SECONDS | 6.0 | Unsplash API timeout |
UNSPLASH_CACHE_TTL_SECONDS | 900 | Feed response cache TTL |
ARTIFACTS_AUDIT_BASE_URL | http://artifacts-audit:8007/api/v1 | Audit service URL |
ARTIFACTS_AUDIT_ENABLED | true | Enable audit log writes |
ARTIFACTS_AUDIT_REQUIRED | false | Fail if audit service unreachable |
| Variable | Default | Description |
|---|
ORCHESTRATOR_GCP_PROJECT_ID | — | GCP project (fallback: GCP_PROJECT_ID, GOOGLE_CLOUD_PROJECT) |
ORCHESTRATOR_GCP_LOCATION | us-central1 | Vertex AI region |
ORCHESTRATOR_VERTEX_MODEL | gemini-1.5-pro | LLM model identifier |
ORCHESTRATOR_VERTEX_STAGING_BUCKET | — | Optional staging bucket |
ORCHESTRATOR_REQUIRE_VERTEX_AGENT | false | Crash if GCP config missing |
API_GATEWAY_BASE_URL | http://localhost:8080/api/v1 | Gateway internal URL |
WARDROBE_BASE_URL | http://localhost:8081/api/v1 | Wardrobe internal URL |
COMMERCE_BASE_URL | http://localhost:8002/api/v1 | Commerce internal URL |
CARTPREP_BASE_URL | http://localhost:8005/api/v1 | CartPrep internal URL |
HYPERBEAM_BASE_URL | http://localhost:8006/api/v1 | Hyperbeam Bridge internal URL |
INTERNAL_API_TIMEOUT_SECONDS | 10.0 | Timeout for tool calls |
| Variable | Default | Description |
|---|
WARDROBE_STORAGE_BACKEND | stub | gcs or stub |
GCS_BUCKET | anyaself-wardrobe-dev | GCS bucket for images |
WARDROBE_EMBEDDINGS_BACKEND | deterministic | http, deterministic, or none |
EVENT_BUS_BACKEND | inmemory | Internal event bus backend |
| Variable | Default | Description |
|---|
COMMERCE_ENFORCE_DOMAIN_ALLOWLIST | false | Restrict offer ingestion to allowed domains |
| Variable | Default | Description |
|---|
VTO_INFERENCE_BACKEND | simulated | simulated, inline, or remote |
VTO_ENABLE_INLINE_WORKER | true | Start inline PyTorch worker thread |
VTO_QUALITY_THRESHOLD | 0.0 | Minimum quality score (0.0 = accept all) |
| Variable | Default | Description |
|---|
CARTPREP_RUNNER_BACKEND | simulated | simulated or playwright |
CARTPREP_ENFORCE_DOMAIN_ALLOWLIST | false | Restrict automation to allowed domains |
| Variable | Default | Description |
|---|
HYPERBEAM_ENFORCE_EVENT_SIGNATURES | false | Verify HMAC on extension events |
HYPERBEAM_EVENT_SIGNING_SECRET | dev-event-secret-change-me | HMAC secret for events |
ORCHESTRATOR_BASE_URL | http://orchestrator:8003/api/v1 | Orchestrator internal URL |
ORCHESTRATOR_EVENTS_ENABLED | true | Forward events to Orchestrator |
ORCHESTRATOR_EVENTS_REQUIRED | false | Fail if Orchestrator unreachable |
| Variable | Default | Description |
|---|
ARTIFACT_STORAGE_BACKEND | local | gcs or local |
ARTIFACT_LOCAL_DIR | /tmp/anyaself-artifacts | Local storage path |
INTERNAL_API_TOKEN | dev-internal-token | Internal service auth |