summaryrefslogtreecommitdiff
path: root/mix.exs
diff options
context:
space:
mode:
authorAlexander Strizhakov <alex.strizhakov@gmail.com>2021-03-27 09:05:33 +0300
committerAlexander Strizhakov <alex.strizhakov@gmail.com>2021-03-27 09:05:33 +0300
commit4d046afd2769cfdc16b2ee48e8c1d8f7f8e8ffa7 (patch)
tree26d0b4efa616c384d9e6d6c8876b42773d36dead /mix.exs
parent6e108b8603de45d489d4aef7e3e271bc5e8c431d (diff)
tests for release config provider
Diffstat (limited to 'mix.exs')
-rw-r--r--mix.exs13
1 files changed, 12 insertions, 1 deletions
diff --git a/mix.exs b/mix.exs
index ae74f50a3..7328b533b 100644
--- a/mix.exs
+++ b/mix.exs
@@ -38,7 +38,7 @@ defmodule Pleroma.Mixfile do
include_executables_for: [:unix],
applications: [ex_syslogger: :load, syslog: :load, eldap: :transient],
steps: [:assemble, &put_otp_version/1, &copy_files/1, &copy_nginx_config/1],
- config_providers: [{Pleroma.Config.ReleaseRuntimeProvider, nil}]
+ config_providers: [{Pleroma.Config.ReleaseRuntimeProvider, release_config_paths()}]
]
]
]
@@ -67,6 +67,17 @@ defmodule Pleroma.Mixfile do
release
end
+ defp release_config_paths do
+ config_path = System.get_env("PLEROMA_CONFIG_PATH") || "/etc/pleroma/config.exs"
+
+ exported_config_path =
+ config_path
+ |> Path.dirname()
+ |> Path.join("#{Mix.env()}.exported_from_db.secret.exs")
+
+ [config_path: config_path, exported_config_path: exported_config_path]
+ end
+
# Configuration for the OTP application.
#
# Type `mix help compile.app` for more information.