From e579f6c2e0da9ce4e165d2c535079e962bc7700b Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Tue, 5 May 2020 11:53:51 +0100 Subject: [PATCH 1/3] Provide some examples of running sytest with worker mode synapse --- docker/README.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/docker/README.md b/docker/README.md index 54f1cd2d9..dd50e6b39 100644 --- a/docker/README.md +++ b/docker/README.md @@ -55,10 +55,41 @@ Synapse: * `BLACKLIST`: set non-empty to change the default blacklist file to the specified path relative to the Synapse directory +Some examples of running Synapse in different configurations: + +* Running Synapse in legacy worker mode (without redis): + + ``` + docker run --rm -it -e POSTGRES=true -e WORKERS=true -v /path/to/synapse\:/src:ro \ + -v /path/to/where/you/want/logs\:/logs matrixdotorg/sytest-synapse:py35 + ``` + +* Running Synapse in redis worker mode: + + ``` + docker network create testfoobar + docker run --network testfoobar --name testredis -d redis:5.0 + docker run --network testfoobar --rm -it -v /path/to/synapse\:/src:ro \ + -v /path/to/where/you/want/logs\:/logs matrixdotorg/sytest-synapse:py35 \ + --redis-host testredis + # Use `docker start/stop testredis` if you want to explicitly kill redis or start it again after reboot + ``` + Dendrite: Dendrite does not currently make use of any environment variables. +## Using the local checkout of Sytest + +If you would like to run tests with a custom checkout of Sytest, add a volume +to the docker command mounting the checkout to the `/sytest` folder in the +container: + +``` +docker run --rm -it /path/to/synapse\:/src:ro -v /path/to/where/you/want/logs\:/logs \ + -v /path/to/code/sytest\:/sytest:ro matrixdotorg/sytest-synapse:py35 +``` + ## Building the containers The containers are built by executing `./build.sh`. You will then have to push From 0325e10ed653e8c20094e73e525490ce243303bb Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Tue, 5 May 2020 12:09:37 +0100 Subject: [PATCH 2/3] legacy worker mode -> worker mode with tcp replication --- docker/README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docker/README.md b/docker/README.md index dd50e6b39..1b70960f8 100644 --- a/docker/README.md +++ b/docker/README.md @@ -57,14 +57,15 @@ Synapse: Some examples of running Synapse in different configurations: -* Running Synapse in legacy worker mode (without redis): +* Running Synapse in worker mode using +[TCP-replication](https://github.com/matrix-org/synapse/blob/master/docs/tcp_replication.md): ``` docker run --rm -it -e POSTGRES=true -e WORKERS=true -v /path/to/synapse\:/src:ro \ -v /path/to/where/you/want/logs\:/logs matrixdotorg/sytest-synapse:py35 ``` -* Running Synapse in redis worker mode: +* Running Synapse in worker mode using redis: ``` docker network create testfoobar From dd434a26435f9309ebbcf93469fc32dd74d69ca8 Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Tue, 5 May 2020 14:51:25 +0100 Subject: [PATCH 3/3] Fix redis docker command --- docker/README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/docker/README.md b/docker/README.md index 1b70960f8..a324361ff 100644 --- a/docker/README.md +++ b/docker/README.md @@ -61,7 +61,7 @@ Some examples of running Synapse in different configurations: [TCP-replication](https://github.com/matrix-org/synapse/blob/master/docs/tcp_replication.md): ``` - docker run --rm -it -e POSTGRES=true -e WORKERS=true -v /path/to/synapse\:/src:ro \ + docker run --rm -it -e POSTGRES=1 -e WORKERS=1 -v /path/to/synapse\:/src:ro \ -v /path/to/where/you/want/logs\:/logs matrixdotorg/sytest-synapse:py35 ``` @@ -70,9 +70,10 @@ Some examples of running Synapse in different configurations: ``` docker network create testfoobar docker run --network testfoobar --name testredis -d redis:5.0 - docker run --network testfoobar --rm -it -v /path/to/synapse\:/src:ro \ - -v /path/to/where/you/want/logs\:/logs matrixdotorg/sytest-synapse:py35 \ - --redis-host testredis + docker run --network testfoobar --rm -it -e POSTGRES=1 -e WORKERS=1 \ + -v /path/to/synapse\:/src:ro \ + -v /path/to/where/you/want/logs\:/logs \ + matrixdotorg/sytest-synapse:py35 --redis-host testredis # Use `docker start/stop testredis` if you want to explicitly kill redis or start it again after reboot ```