-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
System vars should overwrite dotenv vars #46
Comments
Does it work as expected with |
Just tested now in nuxt 2.10, nuxt.config.ts:
It has no effect, i'm setting env variables in a compose file, inside a container they are set, but inside my nuxt app they don't work. So as workaround we have to upload our .env file?? |
Same here, even with |
After looking at the source code, it might be because of the return here: try {
accessSync(envFilePath, constants.R_OK)
} catch (err) {
logger.warn(`No \`${options.filename}\` file found in \`${options.path}\`.`)
return
} Which prevents |
Sorry for spamming but I also just noticed that if you set your system variables in the |
Also experiencing this issue, trying to understand why my env variables were working in development - I use a .env file with docker compose - but not in review - Docker build with My workaround is to |
+1 for this feature request - just as originally raised by @z0w13 Example: https://codesandbox.io/s/fervent-fire-o6dcu
Expected:
Actual:
Would a PR be accepted? |
+1 I think this bug report and this "feature-request" are talking about the same issue. The problem is that when deploying an application, the environment variables are ignored since there isn't a |
Any updates here? Seems problematic to not be able to override the .env with system vars. |
What problem does this feature solve?
In most places where dotenv is used system env vars override the dotenv vars, however dotenv-module does the exact opposite, swapping this around would give the expected result when using
systemvars: true
The text was updated successfully, but these errors were encountered: