Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit a32aa2c

Browse files
committed
patch up docker
1 parent cbc866a commit a32aa2c

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

docker/start.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ def generate_secrets(environ, secrets):
4747

4848
# In normal mode, generate missing keys if any, then run synapse
4949
else:
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

0 commit comments

Comments
 (0)