Matrix Docker Ansible eploy
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

334 строки
13 KiB

  1. ---
  2. matrix_synapse_workers_generic_worker_endpoints:
  3. # This worker can handle API requests matching the following regular
  4. # expressions:
  5. # Sync requests
  6. - ^/_matrix/client/(v2_alpha|r0|v3)/sync$
  7. - ^/_matrix/client/(api/v1|v2_alpha|r0|v3)/events$
  8. - ^/_matrix/client/(api/v1|r0|v3)/initialSync$
  9. - ^/_matrix/client/(api/v1|r0|v3)/rooms/[^/]+/initialSync$
  10. # Federation requests
  11. - ^/_matrix/federation/v1/event/
  12. - ^/_matrix/federation/v1/state/
  13. - ^/_matrix/federation/v1/state_ids/
  14. - ^/_matrix/federation/v1/backfill/
  15. - ^/_matrix/federation/v1/get_missing_events/
  16. - ^/_matrix/federation/v1/publicRooms
  17. - ^/_matrix/federation/v1/query/
  18. - ^/_matrix/federation/v1/make_join/
  19. - ^/_matrix/federation/v1/make_leave/
  20. - ^/_matrix/federation/v1/send_join/
  21. - ^/_matrix/federation/v2/send_join/
  22. - ^/_matrix/federation/v1/send_leave/
  23. - ^/_matrix/federation/v2/send_leave/
  24. - ^/_matrix/federation/v1/invite/
  25. - ^/_matrix/federation/v2/invite/
  26. - ^/_matrix/federation/v1/query_auth/
  27. - ^/_matrix/federation/v1/event_auth/
  28. - ^/_matrix/federation/v1/exchange_third_party_invite/
  29. - ^/_matrix/federation/v1/user/devices/
  30. - ^/_matrix/federation/v1/get_groups_publicised$
  31. - ^/_matrix/key/v2/query
  32. - ^/_matrix/federation/unstable/org.matrix.msc2946/spaces/
  33. - ^/_matrix/federation/(v1|unstable/org.matrix.msc2946)/hierarchy/
  34. # Inbound federation transaction request
  35. - ^/_matrix/federation/v1/send/
  36. # Client API requests
  37. - ^/_matrix/client/(api/v1|r0|v3|unstable)/createRoom$
  38. - ^/_matrix/client/(api/v1|r0|v3|unstable)/publicRooms$
  39. - ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/joined_members$
  40. - ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/context/.*$
  41. - ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/members$
  42. - ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/state$
  43. - ^/_matrix/client/unstable/org.matrix.msc2946/rooms/.*/spaces$
  44. - ^/_matrix/client/(v1|unstable/org.matrix.msc2946)/rooms/.*/hierarchy$
  45. - ^/_matrix/client/unstable/im.nheko.summary/rooms/.*/summary$
  46. - ^/_matrix/client/(api/v1|r0|v3|unstable)/account/3pid$
  47. - ^/_matrix/client/(api/v1|r0|v3|unstable)/devices$
  48. - ^/_matrix/client/(api/v1|r0|v3|unstable)/keys/query$
  49. - ^/_matrix/client/(api/v1|r0|v3|unstable)/keys/changes$
  50. - ^/_matrix/client/versions$
  51. - ^/_matrix/client/(api/v1|r0|v3|unstable)/voip/turnServer$
  52. - ^/_matrix/client/(api/v1|r0|v3|unstable)/joined_groups$
  53. - ^/_matrix/client/(api/v1|r0|v3|unstable)/publicised_groups$
  54. - ^/_matrix/client/(api/v1|r0|v3|unstable)/publicised_groups/
  55. - ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/event/
  56. - ^/_matrix/client/(api/v1|r0|v3|unstable)/joined_rooms$
  57. - ^/_matrix/client/(api/v1|r0|v3|unstable)/search$
  58. # Registration/login requests
  59. - ^/_matrix/client/(api/v1|r0|v3|unstable)/login$
  60. - ^/_matrix/client/(r0|v3|unstable)/register$
  61. - ^/_matrix/client/v1/register/m.login.registration_token/validity$
  62. # Event sending requests
  63. - ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/redact
  64. - ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/send
  65. - ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/state/
  66. - ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/(join|invite|leave|ban|unban|kick)$
  67. - ^/_matrix/client/(api/v1|r0|v3|unstable)/join/
  68. - ^/_matrix/client/(api/v1|r0|v3|unstable)/profile/
  69. # Additionally, the following REST endpoints can be handled for GET requests:
  70. # FIXME: ADDITIONAL CONDITIONS REQUIRED: to be enabled manually
  71. # ^/_matrix/federation/v1/groups/
  72. # Pagination requests can also be handled, but all requests for a given
  73. # room must be routed to the same instance. Additionally, care must be taken to
  74. # ensure that the purge history admin API is not used while pagination requests
  75. # for the room are in flight:
  76. # FIXME: ADDITIONAL CONDITIONS REQUIRED: to be enabled manually
  77. # ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/messages$
  78. # Additionally, the following endpoints should be included if Synapse is configured
  79. # to use SSO (you only need to include the ones for whichever SSO provider you're
  80. # using):
  81. # for all SSO providers
  82. # FIXME: ADDITIONAL CONDITIONS REQUIRED: to be enabled manually
  83. # ^/_matrix/client/(api/v1|r0|v3|unstable)/login/sso/redirect
  84. # ^/_synapse/client/pick_idp$
  85. # ^/_synapse/client/pick_username
  86. # ^/_synapse/client/new_user_consent$
  87. # ^/_synapse/client/sso_register$
  88. # OpenID Connect requests.
  89. # FIXME: ADDITIONAL CONDITIONS REQUIRED: to be enabled manually
  90. # ^/_synapse/client/oidc/callback$
  91. # SAML requests.
  92. # FIXME: ADDITIONAL CONDITIONS REQUIRED: to be enabled manually
  93. # ^/_synapse/client/saml2/authn_response$
  94. # CAS requests.
  95. # FIXME: ADDITIONAL CONDITIONS REQUIRED: to be enabled manually
  96. # ^/_matrix/client/(api/v1|r0|v3|unstable)/login/cas/ticket$
  97. # Ensure that all SSO logins go to a single process.
  98. # For multiple workers not handling the SSO endpoints properly, see
  99. # [#7530](https://github.com/matrix-org/synapse/issues/7530) and
  100. # [#9427](https://github.com/matrix-org/synapse/issues/9427).
  101. # Note that a HTTP listener with `client` and `federation` resources must be
  102. # configured in the `worker_listeners` option in the worker config.
  103. # #### Load balancing
  104. # It is possible to run multiple instances of this worker app, with incoming requests
  105. # being load-balanced between them by the reverse-proxy. However, different endpoints
  106. # have different characteristics and so admins
  107. # may wish to run multiple groups of workers handling different endpoints so that
  108. # load balancing can be done in different ways.
  109. # For `/sync` and `/initialSync` requests it will be more efficient if all
  110. # requests from a particular user are routed to a single instance. Extracting a
  111. # user ID from the access token or `Authorization` header is currently left as an
  112. # exercise for the reader. Admins may additionally wish to separate out `/sync`
  113. # requests that have a `since` query parameter from those that don't (and
  114. # `/initialSync`), as requests that don't are known as "initial sync" that happens
  115. # when a user logs in on a new device and can be *very* resource intensive, so
  116. # isolating these requests will stop them from interfering with other users ongoing
  117. # syncs.
  118. # Federation and client requests can be balanced via simple round robin.
  119. # The inbound federation transaction request `^/_matrix/federation/v1/send/`
  120. # should be balanced by source IP so that transactions from the same remote server
  121. # go to the same process.
  122. # Registration/login requests can be handled separately purely to help ensure that
  123. # unexpected load doesn't affect new logins and sign ups.
  124. # Finally, event sending requests can be balanced by the room ID in the URI (or
  125. # the full URI, or even just round robin), the room ID is the path component after
  126. # `/rooms/`. If there is a large bridge connected that is sending or may send lots
  127. # of events, then a dedicated set of workers can be provisioned to limit the
  128. # effects of bursts of events from that bridge on events sent by normal users.
  129. # #### Stream writers
  130. # Additionally, there is *experimental* support for moving writing of specific
  131. # streams (such as events) off of the main process to a particular worker. (This
  132. # is only supported with Redis-based replication.)
  133. # Currently supported streams are `events` and `typing`.
  134. # To enable this, the worker must have a HTTP replication listener configured,
  135. # have a `worker_name` and be listed in the `instance_map` config. For example to
  136. # move event persistence off to a dedicated worker, the shared configuration would
  137. # include:
  138. # ```yaml
  139. # instance_map:
  140. # event_persister1:
  141. # host: localhost
  142. # port: 8034
  143. # stream_writers:
  144. # events: event_persister1
  145. # ```
  146. # The `events` stream also experimentally supports having multiple writers, where
  147. # work is sharded between them by room ID. Note that you *must* restart all worker
  148. # instances when adding or removing event persisters. An example `stream_writers`
  149. # configuration with multiple writers:
  150. # ```yaml
  151. # stream_writers:
  152. # events:
  153. # - event_persister1
  154. # - event_persister2
  155. # ```
  156. # #### Background tasks
  157. # There is also *experimental* support for moving background tasks to a separate
  158. # worker. Background tasks are run periodically or started via replication. Exactly
  159. # which tasks are configured to run depends on your Synapse configuration (e.g. if
  160. # stats is enabled).
  161. # To enable this, the worker must have a `worker_name` and can be configured to run
  162. # background tasks. For example, to move background tasks to a dedicated worker,
  163. # the shared configuration would include:
  164. # ```yaml
  165. # run_background_tasks_on: background_worker
  166. # ```
  167. # You might also wish to investigate the `update_user_directory` and
  168. # `media_instance_running_background_jobs` settings.
  169. # pusher worker (no API endpoints) [
  170. # Handles sending push notifications to sygnal and email. Doesn't handle any
  171. # REST endpoints itself, but you should set `start_pushers: False` in the
  172. # shared configuration file to stop the main synapse sending push notifications.
  173. # To run multiple instances at once the `pusher_instances` option should list all
  174. # pusher instances by their worker name, e.g.:
  175. # ```yaml
  176. # pusher_instances:
  177. # - pusher_worker1
  178. # - pusher_worker2
  179. # ```
  180. # ]
  181. # appservice worker (no API endpoints) [
  182. # Handles sending output traffic to Application Services. Doesn't handle any
  183. # REST endpoints itself, but you should set `notify_appservices: False` in the
  184. # shared configuration file to stop the main synapse sending appservice notifications.
  185. # Note this worker cannot be load-balanced: only one instance should be active.
  186. # ]
  187. # federation_sender worker (no API endpoints) [
  188. # Handles sending federation traffic to other servers. Doesn't handle any
  189. # REST endpoints itself, but you should set `send_federation: False` in the
  190. # shared configuration file to stop the main synapse sending this traffic.
  191. # If running multiple federation senders then you must list each
  192. # instance in the `federation_sender_instances` option by their `worker_name`.
  193. # All instances must be stopped and started when adding or removing instances.
  194. # For example:
  195. # ```yaml
  196. # federation_sender_instances:
  197. # - federation_sender1
  198. # - federation_sender2
  199. # ```
  200. # ]
  201. matrix_synapse_workers_media_repository_endpoints:
  202. # Handles the media repository. It can handle all endpoints starting with:
  203. - ^/_matrix/media/
  204. # ... and the following regular expressions matching media-specific administration APIs:
  205. - ^/_synapse/admin/v1/purge_media_cache$
  206. - ^/_synapse/admin/v1/room/.*/media.*$
  207. - ^/_synapse/admin/v1/user/.*/media.*$
  208. - ^/_synapse/admin/v1/media/.*$
  209. - ^/_synapse/admin/v1/quarantine_media/.*$
  210. - ^/_synapse/admin/v1/users/.*/media$
  211. # You should also set `enable_media_repo: False` in the shared configuration
  212. # file to stop the main synapse running background jobs related to managing the
  213. # media repository. Note that doing so will prevent the main process from being
  214. # able to handle the above endpoints.
  215. # In the `media_repository` worker configuration file, configure the http listener to
  216. # expose the `media` resource. For example:
  217. # ```yaml
  218. # worker_listeners:
  219. # - type: http
  220. # port: 8085
  221. # resources:
  222. # - names:
  223. # - media
  224. # ```
  225. # Note that if running multiple media repositories they must be on the same server
  226. # and you must configure a single instance to run the background tasks, e.g.:
  227. # ```yaml
  228. # media_instance_running_background_jobs: "media-repository-1"
  229. # ```
  230. # Note that if a reverse proxy is used , then `/_matrix/media/` must be routed for both inbound client and federation requests (if they are handled separately).
  231. matrix_synapse_workers_user_dir_endpoints:
  232. # Handles searches in the user directory. It can handle REST endpoints matching
  233. # the following regular expressions:
  234. - ^/_matrix/client/(api/v1|r0|v3|unstable)/user_directory/search$
  235. # When using this worker you must also set `update_user_directory: False` in the
  236. # shared configuration file to stop the main synapse running background
  237. # jobs related to updating the user directory.
  238. matrix_synapse_workers_frontend_proxy_endpoints:
  239. # Proxies some frequently-requested client endpoints to add caching and remove
  240. # load from the main synapse. It can handle REST endpoints matching the following
  241. # regular expressions:
  242. - ^/_matrix/client/(api/v1|r0|v3|unstable)/keys/upload
  243. # If `use_presence` is False in the homeserver config, it can also handle REST
  244. # endpoints matching the following regular expressions:
  245. # FIXME: ADDITIONAL CONDITIONS REQUIRED: to be enabled manually
  246. # ^/_matrix/client/(api/v1|r0|v3|unstable)/presence/[^/]+/status
  247. # This "stub" presence handler will pass through `GET` request but make the
  248. # `PUT` effectively a no-op.
  249. # It will proxy any requests it cannot handle to the main synapse instance. It
  250. # must therefore be configured with the location of the main instance, via
  251. # the `worker_main_http_uri` setting in the `frontend_proxy` worker configuration
  252. # file. For example:
  253. # ```yaml
  254. # worker_main_http_uri: http://127.0.0.1:8008
  255. # ```
  256. matrix_synapse_workers_avail_list:
  257. - appservice
  258. - federation_sender
  259. - frontend_proxy
  260. - generic_worker
  261. - media_repository
  262. - pusher
  263. - user_dir