Staging Deployment
Environment Configuration Guide
Tracked templates:
Use this when you need detailed reference information for Staging Deployment.
Tracked templates:
.env.example- local default reference..env.local.example- copy to untracked.envfor localhost and LAN work..env.test.example- safe CI/test placeholder values..env.staging.example- staging placeholders forhttps://staging-app.submicrons.net.
The app uses Better Auth. The actual runtime variables are BETTER_AUTH_SECRET and BETTER_AUTH_URL. AUTH_SECRET, AUTH_URL, and APP_URL are accepted as documented aliases for platform compatibility, but staging should keep the Better Auth names explicit.
Staging Required Variables
APP_ENV=stagingAPP_URL=https://staging-app.submicrons.netDATABASE_URLAUTH_SECRETorBETTER_AUTH_SECRETAUTH_TRUST_HOST=trueAUTH_URL,BETTER_AUTH_URL, orAPP_URLLOG_LEVEL=info
External flags must stay disabled:
COMMUNICATION_EXTERNAL_SENDING_ENABLED=falseGOOGLE_DRIVE_SYNC_ENABLED=falseWHATSAPP_SYNC_ENABLED=falseGMAIL_SYNC_ENABLED=falseWOOCOMMERCE_SYNC_ENABLED=falseSOCIAL_SYNC_ENABLED=falsePAYMENT_GATEWAY_ENABLED=falseAI_AUTONOMOUS_ACTIONS_ENABLED=false
Run:
pnpm env:check
pnpm env:check:staging
node scripts/env-check.mjs staging --file=.env.stagingThe committed staging template check allows placeholders. The real staging check should use the untracked values from the staging host or secret manager.
Sprint 24 Demo User Flags
Staging demo users are optional and must be created only with a temporary staging-only password:
SEED_STAGING_DEMO_USERS=true
SEED_STAGING_DEMO_PASSWORD=<temporary-12-plus-character-password>Leave SEED_STAGING_DEMO_USERS=false until the staging database and demo credential handoff are approved. The environment check rejects missing, short, or placeholder demo passwords when the flag is enabled for real staging validation.
Developer Details
- Source
- apps/docs/content/staging-deployment/environment-configuration.md
- Owner
- Platform / Operations
- Status
- Current
- Module
- Staging Deployment
- Related route
- /api/health