From 3d27ea9793f196d6ce474fb0fa25cae8ecfdfc51 Mon Sep 17 00:00:00 2001 From: zafer Date: Thu, 13 Mar 2025 13:25:51 +0200 Subject: [PATCH] prepare prod deployment --- config/prod.exs | 9 ++------- config/runtime.exs | 9 +++------ lib/algora_web/router.ex | 4 ---- 3 files changed, 5 insertions(+), 17 deletions(-) diff --git a/config/prod.exs b/config/prod.exs index 68054eb64..89e31329f 100644 --- a/config/prod.exs +++ b/config/prod.exs @@ -10,8 +10,8 @@ config :algora, AlgoraWeb.Endpoint, cache_static_manifest: "priv/static/cache_ma # Configures Swoosh API Client config :swoosh, api_client: Swoosh.ApiClient.Finch, finch_name: Algora.Finch -# TODO: Disable Swoosh Local Memory Storage -config :swoosh, local: true +# Disable Swoosh Local Memory Storage +config :swoosh, local: false config :logger, format: {LogfmtEx, :format}, @@ -22,10 +22,5 @@ config :algora, swift_mode: true, auto_start_pollers: true -# TODO: remove after migration -config :algora, - dev_routes: true, - require_admin_for_mailbox: true - # Runtime production configuration, including reading # of environment variables, is done on config/runtime.exs. diff --git a/config/runtime.exs b/config/runtime.exs index fee50762e..e8e8ebf54 100644 --- a/config/runtime.exs +++ b/config/runtime.exs @@ -129,12 +129,9 @@ if config_env() == :prod do # # Check `Plug.SSL` for all available options in `force_ssl`. - # TODO: remove after migration - if false do - config :algora, Algora.Mailer, - adapter: Swoosh.Adapters.Sendgrid, - api_key: System.get_env("SENDGRID_API_KEY") - end + config :algora, Algora.Mailer, + adapter: Swoosh.Adapters.Sendgrid, + api_key: System.fetch_env!("SENDGRID_API_KEY") config :swoosh, :api_client, Swoosh.ApiClient.Finch diff --git a/lib/algora_web/router.ex b/lib/algora_web/router.ex index dc148a984..7d8e692d0 100644 --- a/lib/algora_web/router.ex +++ b/lib/algora_web/router.ex @@ -121,10 +121,6 @@ defmodule AlgoraWeb.Router do pipe_through :browser scope "/" do - if Application.compile_env(:algora, :require_admin_for_mailbox) do - pipe_through :require_authenticated_admin - end - forward "/mailbox", Plug.Swoosh.MailboxPreview end end