Configured for release on prod environment.
This commit is contained in:
@ -39,14 +39,15 @@ config :beet_round_server,
|
||||
|
||||
# Configures the endpoint
|
||||
config :beet_round_server, BeetRoundServerWeb.Endpoint,
|
||||
url: [host: "localhost"],
|
||||
url: [host: "https://beetround.example.com"],
|
||||
adapter: Bandit.PhoenixAdapter,
|
||||
render_errors: [
|
||||
formats: [html: BeetRoundServerWeb.ErrorHTML, json: BeetRoundServerWeb.ErrorJSON],
|
||||
layout: false
|
||||
],
|
||||
pubsub_server: BeetRoundServer.PubSub,
|
||||
live_view: [signing_salt: "4HDgM4VC"]
|
||||
live_view: [signing_salt: "4HDgM4VC"],
|
||||
server: true
|
||||
|
||||
# Configures the mailer
|
||||
#
|
||||
|
||||
@ -6,7 +6,9 @@ import Config
|
||||
# which you should run after static files are built and
|
||||
# before starting your production server.
|
||||
config :beet_round_server, BeetRoundServerWeb.Endpoint,
|
||||
cache_static_manifest: "priv/static/cache_manifest.json"
|
||||
cache_static_manifest: "priv/static/cache_manifest.json",
|
||||
url: [host: "https://beetround.example.com"],
|
||||
check_origin: ["https://beetround.example.com"]
|
||||
|
||||
# Configures Swoosh API Client
|
||||
config :swoosh, api_client: Swoosh.ApiClient.Req
|
||||
|
||||
@ -116,4 +116,20 @@ if config_env() == :prod do
|
||||
# config :swoosh, :api_client, Swoosh.ApiClient.Req
|
||||
#
|
||||
# See https://hexdocs.pm/swoosh/Swoosh.html#module-installation for details.
|
||||
mail_relay = System.get_env("MAIL_RELAY") || "example.com"
|
||||
mail_address = System.get_env("MAIL_ADDRESS") || "info@example.com"
|
||||
mail_pw = System.get_env("MAIL_PW") || ""
|
||||
|
||||
config :beet_round_server, BeetRoundServer.Mailer,
|
||||
adapter: Swoosh.Adapters.SMTP,
|
||||
relay: mail_relay,
|
||||
username: mail_address,
|
||||
password: mail_pw,
|
||||
ssl: false,
|
||||
ssl_opts: [verify: :verify_none],
|
||||
tls_options: [verify: :verify_none],
|
||||
tls: :always,
|
||||
auth: :always,
|
||||
port: 587,
|
||||
retries: 2
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user