diff options
author | Richard van der Hoff <richard@matrix.org> | 2019-09-24 12:57:32 +0100 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2019-09-24 12:57:32 +0100 |
commit | ed8b92f0d22b9de96c5ac04ef8ef45531fe45a2c (patch) | |
tree | c6c35d841e75d73ed2a045d30d8abc87487a57ab /docker | |
parent | Merge commit '33757bad1' into rav/saml_mapping_work (diff) | |
parent | Add submit_url response parameter to msisdn /requestToken (#6079) (diff) | |
download | synapse-ed8b92f0d22b9de96c5ac04ef8ef45531fe45a2c.tar.xz |
Merge remote-tracking branch 'origin/develop' into rav/saml_mapping_work
Diffstat (limited to 'docker')
-rw-r--r-- | docker/README.md | 2 | ||||
-rwxr-xr-x | docker/start.py | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/docker/README.md b/docker/README.md index d5879c2f2c..4b712f3f5c 100644 --- a/docker/README.md +++ b/docker/README.md @@ -89,6 +89,8 @@ The following environment variables are supported in run mode: `/data`. * `SYNAPSE_CONFIG_PATH`: path to the config file. Defaults to `<SYNAPSE_CONFIG_DIR>/homeserver.yaml`. +* `SYNAPSE_WORKER`: module to execute, used when running synapse with workers. + Defaults to `synapse.app.homeserver`, which is suitable for non-worker mode. * `UID`, `GID`: the user and group id to run Synapse as. Defaults to `991`, `991`. * `TZ`: the [timezone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) the container will run with. Defaults to `UTC`. diff --git a/docker/start.py b/docker/start.py index 260f2d9943..e41ea20e70 100755 --- a/docker/start.py +++ b/docker/start.py @@ -182,6 +182,7 @@ def main(args, environ): mode = args[1] if len(args) > 1 else None desired_uid = int(environ.get("UID", "991")) desired_gid = int(environ.get("GID", "991")) + synapse_worker = environ.get("SYNAPSE_WORKER", "synapse.app.homeserver") if (desired_uid == os.getuid()) and (desired_gid == os.getgid()): ownership = None else: @@ -245,7 +246,7 @@ def main(args, environ): log("Starting synapse with config file " + config_path) - args = ["python", "-m", "synapse.app.homeserver", "--config-path", config_path] + args = ["python", "-m", synapse_worker, "--config-path", config_path] if ownership is not None: args = ["su-exec", ownership] + args os.execv("/sbin/su-exec", args) |