railyard/apps/vend/.env.example
caelum0x 933306855b feat(vend): flip self-serve signup live and ship its landing page
VEND_SIGNUP_ENABLED now defaults to true (it's the primary funnel, not
an opt-in extra) and GET / now serves a real marketing landing page
describing the white-label kit and linking into the console's existing
self-serve "Create a workspace" signup, instead of a bare root with no
discovery surface for a working signup API.
2026-10-23 15:35:37 +03:00

106 lines
4.5 KiB
Plaintext

# vend-server runtime (required unless marked optional)
VEND_BIND_ADDR=0.0.0.0:8090
DATABASE_URL=postgres://vend:replace_me@127.0.0.1:5432/vend
MINT_BASE=http://127.0.0.1:8080
MINT_API_KEY=replace_with_mint_service_key
RELAY_BASE=http://127.0.0.1:3000
RELAY_KEY=replace_with_relay_service_key
RELAY_BASE_PATH=/openai/v1
# Optional exact Relay health URL for deployments mounted below a URL prefix.
# Defaults to RELAY_BASE + /health (never RELAY_BASE_PATH + /health).
RELAY_HEALTH_URL=
# Existing, distinct Mint accounts. Vend fails startup if any is missing.
VEND_CLEARING_ACCOUNT=acct_replace_with_vend_clearing_account
VEND_PROVIDER_PAYOUT_ACCOUNT=acct_replace_with_provider_account
VEND_PLATFORM_PAYOUT_ACCOUNT=acct_replace_with_platform_account
VEND_MODEL_RATES_JSON={"tensorzero::model_name::openai::gpt-4o-mini":{"input_micros_per_million_tokens":150000,"output_micros_per_million_tokens":600000,"max_input_tokens":128000,"max_output_tokens":16384}}
# Bounded production database pool (optional; validated startup defaults shown).
VEND_DATABASE_MAX_CONNECTIONS=10
VEND_DATABASE_MIN_CONNECTIONS=1
VEND_DATABASE_ACQUIRE_TIMEOUT_MS=10000
VEND_DATABASE_IDLE_TIMEOUT_SECONDS=300
VEND_DATABASE_MAX_LIFETIME_SECONDS=1800
VEND_DATABASE_CONNECT_TIMEOUT_SECONDS=15
VEND_DATABASE_APPLICATION_NAME=vend-server
# HTTP dependency, ingress, readiness, and shutdown bounds (optional).
VEND_MINT_CONNECT_TIMEOUT_MS=3000
VEND_MINT_REQUEST_TIMEOUT_MS=15000
VEND_MINT_READ_TIMEOUT_MS=10000
VEND_MINT_MAX_IDLE_PER_HOST=16
VEND_RELAY_CONNECT_TIMEOUT_MS=5000
VEND_RELAY_REQUEST_TIMEOUT_MS=120000
VEND_RELAY_IDLE_TIMEOUT_MS=45000
VEND_RELAY_MAX_STREAM_SECONDS=900
VEND_RELAY_MAX_IDLE_PER_HOST=64
VEND_HTTP_POOL_IDLE_TIMEOUT_MS=30000
VEND_DEPENDENCY_READINESS_TIMEOUT_MS=3000
VEND_MAX_REQUEST_BYTES=2097152
VEND_SHUTDOWN_GRACE_SECONDS=30
# JSON is the production default; use pretty only for local development.
VEND_LOG_FORMAT=json
# vend-reconcile safety window/batch (optional)
# Reconcile age must be at least the total stream lifetime plus 60 seconds.
VEND_RECONCILE_MIN_AGE_SECONDS=1800
VEND_RECONCILE_LIMIT=100
VEND_RECONCILE_LEASE_SECONDS=120
# Required: SHA-256 hex digest of a high-entropy control-plane bearer token.
# The server rejects missing, malformed, and all-zero values.
VEND_ADMIN_TOKEN_SHA256=replace_with_64_hex_sha256_digest
# Optional overlap digest for zero-downtime rotation: deploy next, move clients,
# then promote next to VEND_ADMIN_TOKEN_SHA256 and remove this variable.
VEND_ADMIN_TOKEN_NEXT_SHA256=
# Required, dedicated 256-bit secret used only to derive non-reversible,
# domain-separated rate-limit subjects. Generate with: openssl rand -hex 32
VEND_RATE_LIMIT_PEPPER_HEX=replace_with_64_random_hex_characters
# Required customer-auth origin. OAuth callbacks are derived exactly as
# /v1/auth/{github,google}/callback. HTTP is accepted only for localhost.
VEND_PUBLIC_BASE_URL=http://127.0.0.1:8090
VEND_CUSTOMER_SESSION_TTL_SECONDS=86400
VEND_CUSTOMER_SETUP_TTL_SECONDS=604800
# Optional OAuth/OIDC providers. Set each client-id/secret pair together.
# Register callbacks matching VEND_PUBLIC_BASE_URL exactly. Unconfigured
# provider routes return 503; native password login remains available.
VEND_GITHUB_CLIENT_ID=
VEND_GITHUB_CLIENT_SECRET=
VEND_GOOGLE_CLIENT_ID=
VEND_GOOGLE_CLIENT_SECRET=
# White-label self-serve signup (POST /v1/auth/signup, the console's
# "Create a workspace" form, and the public landing page at `/`). On by
# default for a fresh deploy -- this is the primary self-serve funnel, not an
# opt-in extra; the launch economics below are required (no silent money
# defaults). Set to false only to run Vend as invite-only.
VEND_SIGNUP_ENABLED=true
VEND_SIGNUP_MODELS=tensorzero::model_name::openai::gpt-4o-mini
VEND_SIGNUP_PLATFORM_FEE_BPS=1000
VEND_SIGNUP_DAILY_CAP_MICROS=50000000
VEND_SIGNUP_MARKUP_BPS=2000
# end_user_reserve (each end user pays from a wallet) or tenant_reserve.
VEND_SIGNUP_FUNDING_MODE=end_user_reserve
VEND_SIGNUP_PER_END_USER_DAILY_CAP_MICROS=5000000
VEND_SIGNUP_MAX_PER_HOUR=30
# vend-bootstrap CLI inputs
VEND_TENANT_NAME=Example Studio
VEND_OWNER_EMAIL=owner@example.com
VEND_OWNER_DISPLAY_NAME=Example Owner
VEND_APP_NAME=Example AI
VEND_MINT_ACCOUNT_ID=acct_replace_with_existing_funded_mint_account
VEND_MODELS=tensorzero::model_name::openai::gpt-4o-mini
VEND_ZDR=false
VEND_MARKUP_BPS=2000
VEND_MIN_FEE_MICROS=0
VEND_PLATFORM_FEE_BPS=0
# tenant_reserve (app wallet pays) or end_user_reserve (each user's wallet pays)
VEND_FUNDING_MODE=tenant_reserve
VEND_KEY_ENV=test
VEND_DAILY_CAP_MICROS=50000000
VEND_PER_END_USER_DAILY_CAP_MICROS=5000000