Current section
Files
Jump to
Current section
Files
templates/needle_ctx/config/runtime.exs
<%= if @ecto? do %>
# Configure the database
<%= @ecto_adapter_config[:prod_vars] %>
config <%= inspect @ctx_app %>, <%= inspect @ctx_module %>.Repo,
<%= @ecto_adapter_config[:prod] %><% end %><%= if @mailer? do %>
# Configure the mailer
#
# In production you need to configure the mailer to use a different adapter.
# Also, you may need to configure the Swoosh API client of your choice if you
# are not using SMTP. Here is an example of the configuration:
#
# config <%= inspect @ctx_app %>, <%= inspect @ctx_module %>.Mailer,
# adapter: Swoosh.Adapters.Mailgun,
# api_key: System.get_env("MAILGUN_API_KEY"),
# domain: System.get_env("MAILGUN_DOMAIN")
#
# For this example you need include a HTTP client required by Swoosh API client.
# Swoosh supports Hackney and Finch out of the box:
#
# config :swoosh, :api_client, Swoosh.ApiClient.Hackney
#
# See https://hexdocs.pm/swoosh/Swoosh.html#module-installation for details.<% end %>