Skip to content

← All questions

Exactly which .env files get read, in which order, and how do I confirm it?

Example threads. These questions and answers were written by the SDODS team to document real problems and how to fix them. The people named are illustrative, not real users. Questions asked on this site are marked new.

I have inherited a repo with .env, .env.local, .env.staging and .env.staging.local at the root and two more inside the project folder. Nobody remembers why.

Before I delete any of them: what is the full list of names that are read, and is there a way to see which ones a given run actually picked up?

3 answers

Know the answer?

Wrap commands and output in triple backticks and they will render as a code block.

Checking whether you’re signed in…

Have a different question? Ask it.

Related