lumber
lumber copied to clipboard
Don't require .env file for deploying to production
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
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).