summary refs log tree commit diff
path: root/docker/start.py
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2019-02-05 18:44:49 +0000
committerRichard van der Hoff <richard@matrix.org>2019-02-05 18:44:49 +0000
commit247543408070d25c6bd16bf46edb7ccbec4fe46f (patch)
treec9e818e8ba5291156cbbbe86afd86767f9af0009 /docker/start.py
parentFilter user directory state query to a subset of state events (#4462) (diff)
parentv0.99.0 (diff)
downloadsynapse-247543408070d25c6bd16bf46edb7ccbec4fe46f.tar.xz
Merge branch 'master' into develop
Diffstat (limited to 'docker/start.py')
-rwxr-xr-xdocker/start.py18
1 files changed, 14 insertions, 4 deletions
diff --git a/docker/start.py b/docker/start.py
index 346df8c87f..941d9996a8 100755
--- a/docker/start.py
+++ b/docker/start.py
@@ -47,9 +47,8 @@ if mode == "generate":
 
 # In normal mode, generate missing keys if any, then run synapse
 else:
-    # Parse the configuration file
     if "SYNAPSE_CONFIG_PATH" in environ:
-        args += ["--config-path", environ["SYNAPSE_CONFIG_PATH"]]
+        config_path = environ["SYNAPSE_CONFIG_PATH"]
     else:
         check_arguments(environ, ("SYNAPSE_SERVER_NAME", "SYNAPSE_REPORT_STATS"))
         generate_secrets(environ, {
@@ -58,10 +57,21 @@ else:
         })
         environ["SYNAPSE_APPSERVICES"] = glob.glob("/data/appservices/*.yaml")
         if not os.path.exists("/compiled"): os.mkdir("/compiled")
-        convert("/conf/homeserver.yaml", "/compiled/homeserver.yaml", environ)
+
+        config_path = "/compiled/homeserver.yaml"
+
+        convert("/conf/homeserver.yaml", config_path, environ)
         convert("/conf/log.config", "/compiled/log.config", environ)
         subprocess.check_output(["chown", "-R", ownership, "/data"])
-        args += ["--config-path", "/compiled/homeserver.yaml"]
+
+
+    args += [
+        "--config-path", config_path,
+
+        # tell synapse to put any generated keys in /data rather than /compiled
+        "--keys-directory", "/data",
+    ]
+
     # Generate missing keys and start synapse
     subprocess.check_output(args + ["--generate-keys"])
     os.execv("/sbin/su-exec", ["su-exec", ownership] + args)