I use .env
environment variable files in every project. Docker Compose supports .env files. And now direnv supports them too. direnv
is a cli tool that detects a .envrc
or .env
file and runs source .env
automatically for you when you cd
into a project directory.
-
Install Homebrew.
-
Install
direnv
.brew install direnv
-
Follow these instructions to add the direnv hook to your shell.