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

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