From 7ba1305c888b1ebbb2d89bcfc6ece16751f99a9c Mon Sep 17 00:00:00 2001 From: Vladimir Rubin Date: Thu, 26 Dec 2024 20:02:09 +0200 Subject: [PATCH] deploy: add elastic email --- config/runtime.exs | 9 +++++++++ docker-compose.yml | 2 ++ 2 files changed, 11 insertions(+) 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