Switch environment file with `-e` flag
See original GitHub issueprisma2 -e .env-file
Use case, developing locally, deploying to lambda using serverless, my package.json
would have the following script:
"deploy-production": "yarn prisma2 lift up --auto-approve && sls deploy --stage production",
To make it work without this, I need to do the following for all env vars
"deploy-production": "DB_URL=$(cat .env.production | grep DB_URL | cut -d '=' -f 2) yarn prisma2 lift up --auto-approve && sls deploy --stage production",
Issue Analytics
- State:
- Created 4 years ago
- Reactions:18
- Comments:13 (6 by maintainers)
Top Results From Across the Web
How To Use Environment Files with env-cmd | DigitalOcean
Learn how to add handle environment variables with the env-cmd package.
Read more >env Command - IBM
The env command allows you to display your current environment or run a specified command in a changed environment. If no flags or...
Read more >Set environment variables from file of key/value pairs
set allows you to change the values of shell options and set the positional parameters, or to display the names and values of...
Read more >Basics → Environment - Vapor Docs
You can pass either the full or short name to the --env ( -e ) flag. vapor run serve -e prod. Process Variables¶....
Read more >Replace environment variables in a file with their actual values?
Common flags: * -h | --help: Display this message. ... compgen -e lists environment variable names without values, for example:
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I like the idea but would suggest to call the argument
--env-file
same as Docker:This also seems relevant for making
yarn prisma2 generate
work with an.env
in the project root (instead of theprisma
folder) as discussed in #1519, unless someone else knows another way to run that without copying/symlinking my application’s.env
file to theprisma
folder (or managing multiple.env
files).