Skip to content

Commit 04a2e63

Browse files
Update the Synapse Worker configuration with new base image name and worker configuration (#105)
This PR updates Complement's Synapse worker-flavoured docker image in a few ways: * Updates the base image name from `synapse:workers` to `synapse-workers`, as it's built from a separate Dockerfile from the base `matrixdotorg/synapse` image. * Update the `SYNAPSE_WORKERS` env var name to `SYNAPSE_WORKER_TYPES` * Switches to an explicit list of worker names. We dropped the `*` functionality after adding sharding capabilities. The worker configuration mirrors [that of sytest](https://github.com/matrix-org/sytest/blob/7d297956d6c5a177d2ea492ce6561b2e2500b291/lib/SyTest/Homeserver/Synapse.pm#L657-L1051). These changes grew out of [this PR on Synapse](matrix-org/synapse#9162) which changed the base image. I'd ideally like feedback from the Synapse team on the chosen worker configuration.
1 parent 5a7037b commit 04a2e63

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

dockerfiles/SynapseWorkers.Dockerfile

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This dockerfile builds on top of Dockerfile-worker and includes a built-in postgres instance
22
# as well as sets up the homeserver so that it is ready for testing via Complement
3-
FROM matrixdotorg/synapse:workers
3+
FROM matrixdotorg/synapse-workers
44

55
# Download a caddy server to stand in front of nginx and terminate TLS using Complement's
66
# custom CA.
@@ -46,8 +46,21 @@ ENTRYPOINT \
4646
SYNAPSE_REPORT_STATS=no \
4747
# Set postgres authentication details which will be placed in the homeserver config file
4848
POSTGRES_PASSWORD=somesecret POSTGRES_USER=postgres POSTGRES_HOST=localhost \
49-
# Use all available worker types
50-
SYNAPSE_WORKERS=* \
49+
# Specify the workers to test with
50+
SYNAPSE_WORKER_TYPES="\
51+
event_persister, \
52+
event_persister, \
53+
background_worker, \
54+
frontend_proxy, \
55+
event_creator, \
56+
user_dir, \
57+
media_repository, \
58+
federation_inbound, \
59+
federation_reader, \
60+
federation_sender, \
61+
synchrotron, \
62+
appservice, \
63+
pusher" \
5164
# Run the script that writes the necessary config files and starts supervisord, which in turn
5265
# starts everything else
5366
/configure_workers_and_start.py

0 commit comments

Comments
 (0)