config/prod.exs

58e6347eeb72 · 1 KB

import Config

config :openagents, :secure_cookies, true

# Note we also include the path to a cache manifest
# containing the digested version of static files. This
# manifest is generated by the `mix assets.deploy` task,
# which you should run after static files are built and
# before starting your production server.
config :openagents, OpenAgentsWeb.Endpoint,
  cache_static_manifest: "priv/static/cache_manifest.json"

# Force using SSL in production. This also sets the "strict-security-transport" header,
# known as HSTS. If you have a health check endpoint, you may want to exclude it below.
# Note `:force_ssl` is required to be set at compile-time.
config :openagents, OpenAgentsWeb.Endpoint,
  force_ssl: [
    rewrite_on: [:x_forwarded_proto],
    exclude: [
      # The load balancer health check probes these paths over plain HTTP.
      # A redirect counts as a failed probe, which drops every node from
      # rotation at once.
      paths: ["/health", "/healthz"],
      hosts: ["localhost", "127.0.0.1"]
    ]
  ]

# Configure Swoosh API Client
config :swoosh, api_client: Swoosh.ApiClient.Req

# Disable Swoosh Local Memory Storage
config :swoosh, local: false

# No mail provider until `config/runtime.exs` finds one in the environment. The
# local adapter is still configured, so a stray send would be swallowed rather
# than raised; saying so here means the settings surface declines to collect an
# address instead of accepting one this deployment cannot mail (#141).
config :openagents, OpenAgents.Notifications.EmailChannel, deliverable: false

# Do not print debug messages in production
config :logger, level: :info

# Runtime production configuration, including reading
# of environment variables, is done on config/runtime.exs.