-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: environment variables not loading on app config (#457)
- Loading branch information
1 parent
40f64b3
commit 7756e0f
Showing
6 changed files
with
23 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,11 +9,7 @@ import Config | |
|
||
config :safira, | ||
ecto_repos: [Safira.Repo], | ||
generators: [timestamp_type: :utc_datetime], | ||
from_email_name: System.get_env("FROM_EMAIL_NAME") || "SEI", | ||
from_email_address: System.get_env("FROM_EMAIL_ADDRESS") || "[email protected]", | ||
umami_script_url: System.get_env("UMAMI_SCRIPT_URL") || "", | ||
umami_website_id: System.get_env("UMAMI_WEBSITE_ID") || "" | ||
generators: [timestamp_type: :utc_datetime] | ||
|
||
# Flop configuration | ||
config :flop, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,12 @@ if System.get_env("PHX_SERVER") do | |
config :safira, SafiraWeb.Endpoint, server: true | ||
end | ||
|
||
config :safira, | ||
from_email_name: System.get_env("FROM_EMAIL_NAME") || "SEI", | ||
from_email_address: System.get_env("FROM_EMAIL_ADDRESS") || "[email protected]", | ||
umami_script_url: System.get_env("UMAMI_SCRIPT_URL") || "", | ||
umami_website_id: System.get_env("UMAMI_WEBSITE_ID") || "" | ||
|
||
if config_env() in [:prod, :stg] do | ||
database_url = | ||
System.get_env("DATABASE_URL") || | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,11 @@ | ||
defmodule Safira.Mailer do | ||
use Swoosh.Mailer, otp_app: :safira | ||
|
||
def get_sender_name do | ||
Application.get_env(:safira, :from_email_name) | ||
end | ||
|
||
def get_sender_address do | ||
Application.get_env(:safira, :from_email_address) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters