Skip to content

Commit

Permalink
also support ".env.#{config_env()}.local" config files
Browse files Browse the repository at this point in the history
which are git ignored
  • Loading branch information
joshk committed Dec 15, 2023
1 parent 8ff49f7 commit c7967b9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
erl_crash.dump

.env
.env.*

# Files matching config/*.secret.exs pattern contain sensitive
# data and you should not commit them into version control.
Expand Down
6 changes: 6 additions & 0 deletions config/runtime.exs
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
import Config
import Dotenvy

source!([
".env",
".env.#{config_env()}.local",
System.get_env()
])

source!([".env", System.get_env()])

if env!("LOG_LEVEL", :string?, nil) do
Expand Down

0 comments on commit c7967b9

Please sign in to comment.