e281a4a03a6a8be35f234d058fbfd5bb2c64fd36
[akkoma] / config / prod.exs
1 use Mix.Config
2
3 # For production, we often load configuration from external
4 # sources, such as your system environment. For this reason,
5 # you won't find the :http configuration below, but set inside
6 # Pleroma.Web.Endpoint.load_from_system_env/1 dynamically.
7 # Any dynamic configuration should be moved to such function.
8 #
9 # Don't forget to configure the url host to something meaningful,
10 # Phoenix uses this information when generating URLs.
11 #
12 # Finally, we also include the path to a cache manifest
13 # containing the digested version of static files. This
14 # manifest is generated by the mix phoenix.digest task
15 # which you typically run after static files are built.
16 config :pleroma, Pleroma.Web.Endpoint,
17 http: [port: 4000],
18 protocol: "http"
19
20 # Supported adapters: https://github.com/swoosh/swoosh#adapters
21 mailer_settings =
22 case String.downcase(System.get_env("PLEROMA_SWOOSH_ADAPTER") || "") do
23 "mailgun" ->
24 [
25 adapter: Swoosh.Adapters.Mailgun,
26 api_key: System.get_env("PLEROMA_MAILGUN_API_KEY"),
27 domain: System.get_env("PLEROMA_MAILGUN_DOMAIN")
28 ]
29
30 "mandrill" ->
31 [
32 adapter: Swoosh.Adapters.Mandrill,
33 api_key: System.get_env("PLEROMA_MANDRILL_API_KEY")
34 ]
35
36 "sendgrid" ->
37 [
38 adapter: Swoosh.Adapters.Sendgrid,
39 api_key: System.get_env("PLEROMA_SENDGRID_API_KEY")
40 ]
41
42 "smtp" ->
43 [
44 adapter: Swoosh.Adapters.SMTP,
45 relay: System.get_env("PLEROMA_SMTP_RELAY"),
46 username: System.get_env("PLEROMA_SMTP_USERNAME"),
47 password: System.get_env("PLEROMA_SMTP_PASSWORD"),
48 port: System.get_env("PLEROMA_SMTP_PORT") || 1025,
49 ssl: true,
50 tls: :always,
51 auth: :always,
52 retries: 3
53 ]
54
55 _ ->
56 [adapter: Swoosh.Adapters.Local]
57 end
58
59 config :pleroma, Pleroma.Mailer, mailer_settings
60
61 # Do not print debug messages in production
62 config :logger, level: :info
63
64 # ## SSL Support
65 #
66 # To get SSL working, you will need to add the `https` key
67 # to the previous section and set your `:url` port to 443:
68 #
69 # config :pleroma, Pleroma.Web.Endpoint,
70 # ...
71 # url: [host: "example.com", port: 443],
72 # https: [:inet6,
73 # port: 443,
74 # keyfile: System.get_env("SOME_APP_SSL_KEY_PATH"),
75 # certfile: System.get_env("SOME_APP_SSL_CERT_PATH")]
76 #
77 # Where those two env variables return an absolute path to
78 # the key and cert in disk or a relative path inside priv,
79 # for example "priv/ssl/server.key".
80 #
81 # We also recommend setting `force_ssl`, ensuring no data is
82 # ever sent via http, always redirecting to https:
83 #
84 # config :pleroma, Pleroma.Web.Endpoint,
85 # force_ssl: [hsts: true]
86 #
87 # Check `Plug.SSL` for all available options in `force_ssl`.
88
89 # ## Using releases
90 #
91 # If you are doing OTP releases, you need to instruct Phoenix
92 # to start the server for all endpoints:
93 #
94 # config :phoenix, :serve_endpoints, true
95 #
96 # Alternatively, you can configure exactly which server to
97 # start per endpoint:
98 #
99 # config :pleroma, Pleroma.Web.Endpoint, server: true
100 #
101
102 # Finally import the config/prod.secret.exs
103 # which should be versioned separately.
104 import_config "prod.secret.exs"