This repository was archived by the owner on Apr 26, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,11 @@ def generate_secrets(environ, secrets):
4747
4848# In normal mode, generate missing keys if any, then run synapse
4949else :
50+
51+ # tell synapse to put any generated keys in /data rather than /compiled by
52+ # default
53+ SYNAPSE_KEY_PATH = environ .get ("SYNAPSE_KEY_PATH" , "/data" )
54+
5055 if "SYNAPSE_CONFIG_PATH" in environ :
5156 config_path = environ ["SYNAPSE_CONFIG_PATH" ]
5257 else :
@@ -59,7 +64,7 @@ def generate_secrets(environ, secrets):
5964 if not os .path .exists ("/compiled" ): os .mkdir ("/compiled" )
6065
6166 config_path = "/compiled/homeserver.yaml"
62-
67+
6368 # Convert SYNAPSE_NO_TLS to boolean if exists
6469 if "SYNAPSE_NO_TLS" in environ :
6570 tlsanswerstring = str .lower (environ ["SYNAPSE_NO_TLS" ])
@@ -79,9 +84,7 @@ def generate_secrets(environ, secrets):
7984
8085 args += [
8186 "--config-path" , config_path ,
82-
83- # tell synapse to put any generated keys in /data rather than /compiled
84- "--keys-directory" , "/data" ,
87+ "--keys-directory" , SYNAPSE_KEY_PATH
8588 ]
8689
8790 # Generate missing keys and start synapse
You can’t perform that action at this time.
0 commit comments