summary refs log tree commit diff
diff options
context:
space:
mode:
authorJorik Schellekens <joriks@matrix.org>2019-08-21 16:49:18 +0100
committerJorik Schellekens <joriks@matrix.org>2019-08-28 15:59:54 +0100
commitaed01c8b939787bdd1200897cdc5b0cc4962ad6f (patch)
tree242fa7a99725853c7aca9194106c046217e417b2
parentDon't need those either (diff)
downloadsynapse-aed01c8b939787bdd1200897cdc5b0cc4962ad6f.tar.xz
Tls config
-rw-r--r--synapse_topology/model/config.py15
1 files changed, 12 insertions, 3 deletions
diff --git a/synapse_topology/model/config.py b/synapse_topology/model/config.py
index fcc5b48e41..bf860930e0 100644
--- a/synapse_topology/model/config.py
+++ b/synapse_topology/model/config.py
@@ -1,15 +1,21 @@
 from synapse.config.database import DatabaseConfig
 from synapse.config.server import ServerConfig
+from synapse.config.tls import TlsConfig
+from synapse.config.logger import LoggingConfig
 from model import get_config_dir, get_data_dir, set_config_dir
 
 
 def create_config(conf):
+    server_name = conf["server_name"]
+    del conf["server_name"]
     server = ServerConfig().generate_config_section(
-        conf["server_name"], get_data_dir(), False, conf["listeners"]
+        server_name, get_data_dir(), False, **conf
     )
     database = DatabaseConfig().generate_config_section(get_data_dir(), **conf)
-
-    return "\n\n".join([server, database])
+    tls = TlsConfig().generate_config_section(
+        get_config_dir(), server_name, get_data_dir(), **conf
+    )
+    return "\n\n".join([server, database, tls])
 
 
 set_config_dir("/exampledir/")
@@ -32,6 +38,9 @@ print(
                     "type": "http",
                 },
             ],
+            "tls_certificate_path": "asdfasfdasdfadf",
+            "tls_private_key_path": "asdfasfdha;kdfjhafd",
+            "acme_domain": "asdfaklhsadfkj",
         }
     )
 )