diff --git a/config/runtime.exs b/config/runtime.exs index d671728..cb05007 100644 --- a/config/runtime.exs +++ b/config/runtime.exs @@ -122,4 +122,13 @@ if config_env() == :prod do # config :swoosh, :api_client, Swoosh.ApiClient.Hackney # # See https://hexdocs.pm/swoosh/Swoosh.html#module-installation for details. + config :your_app, YourApp.Mailer, + adapter: Swoosh.Adapters.SMTP, + relay: "smtp.elasticemail.com", + port: 2525, + username: System.get_env("ELASTIC_EMAIL_USERNAME"), + password: System.get_env("ELASTIC_EMAIL_PASSWORD"), + ssl: false, + tls: :always, + auth: :always end diff --git a/docker-compose.yml b/docker-compose.yml index b2400b3..2606c91 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,6 +9,8 @@ services: - DATABASE_URL=${DATABASE_URL} - SECRET_KEY_BASE=${SECRET_KEY_BASE} - EXMR_ENABLE_REGISTRATION=true + - ELASTIC_EMAIL_USERNAME=${ELASTIC_EMAIL_USERNAME} + - ELASTIC_EMAIL_PASSWORD=${ELASTIC_EMAIL_PASSWORD} depends_on: - db