tests for release config provider
This commit is contained in:
parent
6e108b8603
commit
4d046afd27
4 changed files with 70 additions and 11 deletions
13
mix.exs
13
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, ©_files/1, ©_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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue