DEV Community

Discussion on: Stop Using .env Files Now!

Collapse
 
wiseai profile image
Mahmoud Harmouch

Yeah, but you can commit something like this and generate the .env file upon build/deploy and set the values.

Thread Thread
 
brense profile image
Rense Bakker

But why? All hosting providers I can think of, provide a way to specify environment variables. Why make it more complicated than it needs to be? Environment variables: it's in the name, they're specific to an environment. It's illogical and a potential security risk to put something thats environment specific into something that is not (your source code/version control).