summary refs log tree commit diff
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2019-06-25 18:21:32 +0100
committerRichard van der Hoff <richard@matrix.org>2019-06-26 15:48:38 +0100
commit6347dc1beddf71411d0615f4e4101b814457a836 (patch)
treea368c4e821f0bd562a594e99efdb6a88f73e476e
parentchangelog (diff)
downloadsynapse-6347dc1beddf71411d0615f4e4101b814457a836.tar.xz
Add support for SYNAPSE_CONFIG_DIR
-rw-r--r--docker/README.md2
-rwxr-xr-xdocker/start.py3
2 files changed, 5 insertions, 0 deletions
diff --git a/docker/README.md b/docker/README.md
index 5c85c538a8..a42d1d24b6 100644
--- a/docker/README.md
+++ b/docker/README.md
@@ -186,6 +186,8 @@ The following environment variables are supported in this mode:
 * `SYNAPSE_REPORT_STATS` (mandatory, `yes` or `no`): whether to enable
   anonymous statistics reporting.
 * `SYNAPSE_CONFIG_PATH` (mandatory): path to the file to be generated.
+* `SYNAPSE_CONFIG_DIR`: where additional config files (such as the log config
+  and event signing key) will be stored. Defaults to `/data`.
 * `SYNAPSE_DATA_DIR`: where the generated config will put persistent data
   such as the datatase and media store. Defaults to `/data`.
 * `UID`, `GID`: the user id and group id to use for creating the data
diff --git a/docker/start.py b/docker/start.py
index ad968b2a67..99107a9d54 100755
--- a/docker/start.py
+++ b/docker/start.py
@@ -116,6 +116,7 @@ def run_generate_config(environ, ownership):
         if v not in environ:
             error("Environment variable '%s' is mandatory in `generate` mode." % (v,))
 
+    config_dir = environ.get("SYNAPSE_CONFIG_DIR", "/data")
     data_dir = environ.get("SYNAPSE_DATA_DIR", "/data")
 
     # make sure that synapse has perms to write to the data dir.
@@ -131,6 +132,8 @@ def run_generate_config(environ, ownership):
         environ["SYNAPSE_REPORT_STATS"],
         "--config-path",
         environ["SYNAPSE_CONFIG_PATH"],
+        "--config-directory",
+        config_dir,
         "--data-directory",
         data_dir,
         "--generate-config",