diff options
author | rinpatch <rinpatch@sdf.org> | 2019-06-21 21:56:49 +0300 |
---|---|---|
committer | rinpatch <rinpatch@sdf.org> | 2019-06-21 22:01:59 +0300 |
commit | 960d6b54e8575b828d34fcf0b69e634dc4d33fe0 (patch) | |
tree | d6f53b4b52e1064eeddcb20827b5f82be84087f6 /priv/templates | |
parent | 6906db512dee7aa041b98c25312dabafd43ad932 (diff) | |
download | pleroma-960d6b54e8575b828d34fcf0b69e634dc4d33fe0.tar.gz |
use Config in generated config when available
Mix.Config is deprecated and does not work on OTP releases. However
we can't fully switch to Config because it is not present in
Elixir < 1.9. I tried to evaluate if Config is available at runtime,
but for some weird reason OTP releases crash if I do that.
Diffstat (limited to 'priv/templates')
-rw-r--r-- | priv/templates/sample_config.eex | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/priv/templates/sample_config.eex b/priv/templates/sample_config.eex index 8b45acb05..526593d0a 100644 --- a/priv/templates/sample_config.eex +++ b/priv/templates/sample_config.eex @@ -3,7 +3,11 @@ # NOTE: This file should not be committed to a repo or otherwise made public # without removing sensitive information. -use Mix.Config +<%= if Code.ensure_loaded?(Config) do + "import Config" +else + "use Mix.Config" +end %> config :pleroma, Pleroma.Web.Endpoint, url: [host: "<%= domain %>", scheme: "https", port: <%= port %>], |