Fix config path lookup
ci/woodpecker/pr/lint Pipeline was successful Details
ci/woodpecker/pr/release Pipeline was successful Details
ci/woodpecker/pr/test Pipeline failed Details

This commit is contained in:
Norm 2022-07-05 07:33:25 -04:00
parent 8a46daec4f
commit 271e08fa48
1 changed files with 7 additions and 2 deletions

View File

@ -12,8 +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/akkoma/config.exs" ||
"/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