Merge branch 'restricted-relations-embedding' into 'develop'
[akkoma] / config / releases.exs
1 import Config
2
3 config :pleroma, :instance, static_dir: "/var/lib/pleroma/static"
4 config :pleroma, Pleroma.Uploaders.Local, uploads: "/var/lib/pleroma/uploads"
5 config :pleroma, :modules, runtime_dir: "/var/lib/pleroma/modules"
6
7 config_path = System.get_env("PLEROMA_CONFIG_PATH") || "/etc/pleroma/config.exs"
8
9 config :pleroma, release: true, config_path: config_path
10
11 if File.exists?(config_path) do
12 import_config config_path
13 else
14 warning = [
15 IO.ANSI.red(),
16 IO.ANSI.bright(),
17 "!!! #{config_path} not found! Please ensure it exists and that PLEROMA_CONFIG_PATH is unset or points to an existing file",
18 IO.ANSI.reset()
19 ]
20
21 IO.puts(warning)
22 end
23
24 exported_config =
25 config_path
26 |> Path.dirname()
27 |> Path.join("prod.exported_from_db.secret.exs")
28
29 if File.exists?(exported_config) do
30 import_config exported_config
31 end