Merge remote-tracking branch 'pleroma/develop' into cycles-router
[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 config :phoenix, serve_endpoints: true
21
22 # Do not print debug messages in production
23 config :logger, :console, level: :info
24 config :logger, :ex_syslogger, level: :info
25
26 # ## SSL Support
27 #
28 # To get SSL working, you will need to add the `https` key
29 # to the previous section and set your `:url` port to 443:
30 #
31 # config :pleroma, Pleroma.Web.Endpoint,
32 # ...
33 # url: [host: "example.com", port: 443],
34 # https: [:inet6,
35 # port: 443,
36 # keyfile: System.get_env("SOME_APP_SSL_KEY_PATH"),
37 # certfile: System.get_env("SOME_APP_SSL_CERT_PATH")]
38 #
39 # Where those two env variables return an absolute path to
40 # the key and cert in disk or a relative path inside priv,
41 # for example "priv/ssl/server.key".
42 #
43 # We also recommend setting `force_ssl`, ensuring no data is
44 # ever sent via http, always redirecting to https:
45 #
46 # config :pleroma, Pleroma.Web.Endpoint,
47 # force_ssl: [hsts: true]
48 #
49 # Check `Plug.SSL` for all available options in `force_ssl`.
50
51 # ## Using releases
52 #
53 # If you are doing OTP releases, you need to instruct Phoenix
54 # to start the server for all endpoints:
55 #
56 # config :phoenix, :serve_endpoints, true
57 #
58 # Alternatively, you can configure exactly which server to
59 # start per endpoint:
60 #
61 # config :pleroma, Pleroma.Web.Endpoint, server: true
62 #
63
64 # Finally import the config/prod.secret.exs
65 # which should be versioned separately.
66 if File.exists?("./config/prod.secret.exs") do
67 import_config "prod.secret.exs"
68 else
69 "`config/prod.secret.exs` not found. You may want to create one by running `mix pleroma.instance gen`"
70 |> IO.warn([])
71 end
72
73 if File.exists?("./config/prod.exported_from_db.secret.exs"),
74 do: import_config("prod.exported_from_db.secret.exs")