Configuration
Environment variables and runtime configuration layers.
Configuration layers
Classify variables by the first runtime that reads them. Keep Docker build, container runtime, and Trigger.dev cloud task runtime separate.
- Docker build: only
GIT_COMMIT_SHA,VERCEL_ENV,PUBLIC_AUTH_PROVIDER, and the optional Infisical BuildKit secret file. - Web/API container runtime: site, database, auth, OAuth, email, billing, storage, and public runtime config.
- Trigger deploy CI: only
TRIGGER_ACCESS_TOKEN,TRIGGER_PROJECT_ID, and variables that need to be synced to Trigger. - Trigger.dev cloud task runtime: database, S3, AI provider keys, and AI tuning variables.
- BullMQ runtime:
REDIS_URLfor a self-hosted persistent worker.
Critical variables
- Docker build:
GIT_COMMIT_SHA,VERCEL_ENV,PUBLIC_AUTH_PROVIDER, optionalinfisical_envBuildKit secret file for build-time/public config only - Web/API auth:
AUTH_SECRET,BETTER_AUTH_SECRET,PUBLIC_CLERK_PUBLISHABLE_KEY,CLERK_SECRET_KEY - Web/API OAuth:
OAUTH_GITHUB_CLIENT_ID,OAUTH_GITHUB_CLIENT_SECRET,OAUTH_GOOGLE_CLIENT_ID,OAUTH_GOOGLE_CLIENT_SECRET,PUBLIC_OAUTH_GOOGLE_CLIENT_ID - Data:
DATABASE_URL - Queues:
TRIGGER_SECRET_KEYfor Web/API dispatch to Trigger.dev,TRIGGER_ACCESS_TOKENfor CI task deploy, andREDIS_URLfor BullMQ - Billing:
STRIPE_SECRET_KEY,STRIPE_WEBHOOK_SECRET,CREEM_API_KEY,CREEM_WEBHOOK_SECRET,PAYMENT_PROVIDER_DEFAULT - Stripe prices:
STRIPE_PRICE_SUB_*,STRIPE_PRICE_CREDITS_*(or use lookup-key fallback via seededlookup:xxxrefs) - Storage:
S3_*,PUBLIC_S3_URL_BASE,BETTER_UPLOAD_PROVIDER - Site URL and allowed origins:
SITE_URL,TRUSTED_ORIGINS
OAUTH_GITHUB_CLIENT_ID and OAUTH_GOOGLE_CLIENT_ID are Web/API auth runtime config only. Docker build and Trigger.dev cloud AI tasks do not need them.
Safety checklist
- Do not store production secrets in plain text files.
- Keep callback URLs aligned with the deployment domain.
- Verify staging and production webhook secrets are isolated.