fix: add turbo start task with passThroughEnv for deployment env injection#993
fix: add turbo start task with passThroughEnv for deployment env injection#993jingerpie wants to merge 1 commit intoAmanVarshney01:mainfrom
Conversation
…ction Turborepo filters environment variables by default. Without a start task with passThroughEnv, running `turbo run start` strips all env vars from the child process, causing server crashes in Docker-based deployments (Dokploy, Railway, etc.) where env vars are injected at runtime. Fixes AmanVarshney01#992
|
@jingerpie is attempting to deploy a commit to the Better T Stack Team on Vercel. A member of the Team first needs to authorize it. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughAdded an optional Changes
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
starttask to the generatedturbo.jsonwithpassThroughEnv: ["*"]passThroughEnvto theTurboTaskinterfaceProblem
Turborepo filters environment variables by default. When deploying with
turbo run start --filter=serveron Docker-based platforms (Dokploy, Railway, etc.), all server env vars areundefinedat runtime because Turborepo doesn't forward them to the child process.This causes immediate crashes with
@t3-oss/env-corevalidation:Fix
The
starttask withpassThroughEnv: ["*"]tells Turborepo to forward all environment variables to the server process, which is the expected behavior for production deployments.Test plan
turbo.jsonincludes thestarttask withpassThroughEnvturbo run start --filter=serverand confirm env vars are availableFixes #992
Summary by CodeRabbit
Release Notes
starttask to the build pipeline with proper dependency management, disabled caching, and persistent execution mode for reliable builds.