R
Railway4mo ago
madders

Monorepo env failure

i am working on a turbo repo mono repo application that has this folder structure. ./apps/admin-server ./apps/admin-ui the admin-server is an adonis application and the ui is a react application the issue i am facing is that when using railway or coolify to host the server application, I paste paste my env variables in the ui. when i run npm run start, i run the built version of the admin server but it doesn't pick up the .env variables. usually when i host an non monorepo adonis applications, the application picks ups the environment variables but it looks like it doesn't pick it up because the built application is found in app/admin-server/build. it works on my machine but because i have postbuild script that moves the .env from the ./apps/admin-server to ./apps/admin-server/build but i am unwilling to upload my .env file to github. Is a solution anyone uses
Solution:
hello, this was due to a recent change in turbo, please see their docs for more info - https://turbo.build/repo/docs/crafting-your-repository/using-environment-variables#environment-modes
Jump to solution
3 Replies
Percy
Percy4mo ago
Project ID: 33b6c2c5-261d-43b0-8755-985aca0ec2de
madders
maddersOP4mo ago
33b6c2c5-261d-43b0-8755-985aca0ec2de
Solution
Brody
Brody4mo ago
hello, this was due to a recent change in turbo, please see their docs for more info - https://turbo.build/repo/docs/crafting-your-repository/using-environment-variables#environment-modes
Want results from more Discord servers?
Add your server