3 ms·
Just set those env vars in your IDE. Let your IDE or docker-compose or whatever read an .env file if you must. But don't do it directly from your application co
by isoprophlex 2y ago
Just set those env vars in your IDE. Let your IDE or docker-compose or whatever read an .env file if you must. But don't do it directly from your application code, indeed you're one lazy dev away from putting an .env file on prod servers.
Using dotenv-like constructions is, in my eyes, an antipattern.
- aendruk 2y agoAnd it need not even be an IDE. Whatever environment you use for development, set environment variables in that.
- Tainnor 2y agoPlease don't configure important things in the IDE. IDE configs are notoriously fickle and checking them into the repo usually just leads to a lot of problems in my experience, plus it will mean duplicated effort every time you need to do something from the CLI.
- adolph 2y ago> Just set those env vars in your IDE. How is that different from a dotenv, other than location of where the k/v persists?
- hu3 2y agoI've seen so many .env files in production that I don't even wince anymore. I just formalize the finding by email and carry on.