lumber icon indicating copy to clipboard operation
lumber copied to clipboard

Don't require .env file for deploying to production

Open lfcipriani opened this issue 6 years ago • 1 comments

While deploying using docker to Heroku, I realized that we always need the .env file copied to the image otherwise the node app will throw an exception that it's missing. This means also that the node app don't take into account the envitonment variable set by Heroku.

It's not safe to create docker image with .env containing secrets. Would be nice to be able to disable dotenv support in production and rely on real environment variables.

Thanks

lfcipriani avatar Aug 07 '18 21:08 lfcipriani

Also running into this - it'd be nice to just defer to process.env if the .env file is not there and not require the file be there. Also comes up when deploying directly from a git repo, which wouldn't have the .env file in it (since it shouldn't be committed).

joeellis avatar Sep 20 '18 15:09 joeellis