Fix config path lookup #51

Merged
floatingghost merged 3 commits from norm/akkoma:fix-config-path into develop 2022-07-06 18:28:41 +00:00
1 changed files with 7 additions and 1 deletions

View File

@ -12,7 +12,13 @@ defmodule Pleroma.Config.ReleaseRuntimeProvider do
with_defaults = Config.Reader.merge(config, Pleroma.Config.Holder.release_defaults())
config_path =
opts[:config_path] || System.get_env("PLEROMA_CONFIG_PATH") || "/etc/pleroma/config.exs"
cond do
opts[:config_path] -> opts[:config_path]
System.get_env("PLEROMA_CONFIG_PATH") -> System.get_env("PLEROMA_CONFIG_PATH")
System.get_env("AKKOMA_CONFIG_PATH") -> System.get_env("AKKOMA_CONFIG_PATH")
File.exists?("/etc/akkoma/config.exs") -> "/etc/akkoma/config.exs"
true -> "/etc/pleroma/config.exs"
end
with_runtime_config =
if File.exists?(config_path) do