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

Commit

Permalink
patch up docker
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkowl committed Apr 29, 2019
1 parent cbc866a commit a32aa2c
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions docker/start.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ def generate_secrets(environ, secrets):

# In normal mode, generate missing keys if any, then run synapse
else:

# tell synapse to put any generated keys in /data rather than /compiled by
# default
SYNAPSE_KEY_PATH = environ.get("SYNAPSE_KEY_PATH", "/data")

if "SYNAPSE_CONFIG_PATH" in environ:
config_path = environ["SYNAPSE_CONFIG_PATH"]
else:
Expand All @@ -59,7 +64,7 @@ def generate_secrets(environ, secrets):
if not os.path.exists("/compiled"): os.mkdir("/compiled")

config_path = "/compiled/homeserver.yaml"

# Convert SYNAPSE_NO_TLS to boolean if exists
if "SYNAPSE_NO_TLS" in environ:
tlsanswerstring = str.lower(environ["SYNAPSE_NO_TLS"])
Expand All @@ -79,9 +84,7 @@ def generate_secrets(environ, secrets):

args += [
"--config-path", config_path,

# tell synapse to put any generated keys in /data rather than /compiled
"--keys-directory", "/data",
"--keys-directory", SYNAPSE_KEY_PATH
]

# Generate missing keys and start synapse
Expand Down

0 comments on commit a32aa2c

Please sign in to comment.