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

Remove not needed replication listener in docker compose example #14107

Merged
merged 3 commits into from
Oct 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/14107.doc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove not needed `replication` listener in docker compose example.
16 changes: 1 addition & 15 deletions contrib/docker_compose_workers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,20 +94,6 @@ worker_replication_host: synapse
worker_replication_http_port: 9093
```

### Add Workers to `instance_map`

Locate the `instance_map` section of your `homeserver.yaml` and populate it with your workers:

```yaml
instance_map:
synapse-generic-worker-1: # The worker_name setting in your worker configuration file
host: synapse-generic-worker-1 # The name of the worker service in your Docker Compose file
port: 8034 # The port assigned to the replication listener in your worker config file
Comment on lines -97 to -105
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An instance_map is only is required for stream writers.
See also:

elif worker_type == "event_persister":
# Event persisters write to the events stream, so we need to update
# the list of event stream writers
shared_config.setdefault("stream_writers", {}).setdefault("events", []).append(
worker_name
)
# Map of stream writer instance names to host/ports combos
instance_map[worker_name] = {
"host": "localhost",
"port": worker_port,
}

Stream writers are not part of this example and explanation and need some more configuration eg stream_writers.

synapse-federation-sender-1:
host: synapse-federation-sender-1
port: 8034
```

### Configure Federation Senders

This section is applicable if you are using Federation senders (synapse.app.federation_sender). Locate the `send_federation` and `federation_sender_instances` settings in your `homeserver.yaml` and configure them:
Expand All @@ -122,4 +108,4 @@ federation_sender_instances:

## Other Worker types

Using the concepts shown here it is possible to create other worker types in Docker Compose. See the [Workers](https://matrix-org.github.io/synapse/latest/workers.html#available-worker-applications) documentation for a list of available workers.
Using the concepts shown here it is possible to create other worker types in Docker Compose. See the [Workers](https://matrix-org.github.io/synapse/latest/workers.html#available-worker-applications) documentation for a list of available workers.
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,4 @@ worker_name: synapse-federation-sender-1
worker_replication_host: synapse
worker_replication_http_port: 9093

worker_listeners:
- type: http
port: 8034
resources:
- names: [replication]

worker_log_config: /data/federation_sender.log.config
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ worker_replication_host: synapse
worker_replication_http_port: 9093

worker_listeners:
- type: http
port: 8034
resources:
- names: [replication]
- type: http
port: 8081
x_forwarded: true
Expand Down