X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fpleroma%2Fconfig%2Fholder.ex;h=4d186a8549be186ee6fba24c313cd722a2b198aa;hb=5856f51717c12f4c6b0b89e480ff689c8480393d;hp=f037d5d483b2298e1b92c4b02ed5fcc056806af9;hpb=423cfaf141afb03676aeb5e0f377be67e89092fc;p=akkoma
diff --git a/lib/pleroma/config/holder.ex b/lib/pleroma/config/holder.ex
index f037d5d48..4d186a854 100644
--- a/lib/pleroma/config/holder.ex
+++ b/lib/pleroma/config/holder.ex
@@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2020 Pleroma Authors
+# Copyright © 2017-2021 Pleroma Authors
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Config.Holder do
@@ -9,12 +9,7 @@ defmodule Pleroma.Config.Holder do
def save_default do
default_config =
if System.get_env("RELEASE_NAME") do
- release_config =
- [:code.root_dir(), "releases", System.get_env("RELEASE_VSN"), "releases.exs"]
- |> Path.join()
- |> Pleroma.Config.Loader.read()
-
- Pleroma.Config.Loader.merge(@config, release_config)
+ Pleroma.Config.Loader.merge(@config, release_defaults())
else
@config
end
@@ -32,4 +27,16 @@ defmodule Pleroma.Config.Holder do
def default_config(group, key), do: get_in(get_default(), [group, key])
defp get_default, do: Pleroma.Config.get(:default_config)
+
+ @spec release_defaults() :: keyword()
+ def release_defaults do
+ [
+ pleroma: [
+ {:instance, [static_dir: "/var/lib/pleroma/static"]},
+ {Pleroma.Uploaders.Local, [uploads: "/var/lib/pleroma/uploads"]},
+ {:modules, [runtime_dir: "/var/lib/pleroma/modules"]},
+ {:release, true}
+ ]
+ ]
+ end
end