Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/processone/ejabberd.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorBadlop <badlop@process-one.net>2021-07-15 21:52:50 +0300
committerBadlop <badlop@process-one.net>2021-07-16 14:57:25 +0300
commit91763bbc611884c9e115b9f5dddde63f1d2c0dbc (patch)
treefacdf2d4fce3083d0376b3a1eb72a8092d784831 /config
parente0c9a6308dcf29a611f5b06675167953ee3ce398 (diff)
As Mix config now must be evaluated at runtime, rename to runtime.exs
Diffstat (limited to 'config')
-rw-r--r--config/config.exs10
-rw-r--r--config/runtime.exs12
2 files changed, 12 insertions, 10 deletions
diff --git a/config/config.exs b/config/config.exs
deleted file mode 100644
index ef479a4db..000000000
--- a/config/config.exs
+++ /dev/null
@@ -1,10 +0,0 @@
-use Mix.Config
-
-# This is standard path in the context of ejabberd release
-config :ejabberd,
- file: "config/ejabberd.yml",
- log_path: 'log/ejabberd.log'
-
-# Customize Mnesia directory:
-config :mnesia,
- dir: 'database/'
diff --git a/config/runtime.exs b/config/runtime.exs
new file mode 100644
index 000000000..050eae8b0
--- /dev/null
+++ b/config/runtime.exs
@@ -0,0 +1,12 @@
+import Config
+
+rootpath = System.get_env("RELEASE_ROOT", "")
+
+# This is standard path in the context of ejabberd release
+config :ejabberd,
+ file: Path.join(rootpath, "etc/ejabberd/ejabberd.yml"),
+ log_path: Path.join(rootpath, 'var/log/ejabberd/ejabberd.log')
+
+# Customize Mnesia directory:
+config :mnesia,
+ dir: Path.join(rootpath, 'var/lib/ejabberd/')