Matrix Docker Ansible eploy
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 

199 satır
11 KiB

  1. # SPDX-FileCopyrightText: 2023 Johan Swetzén
  2. # SPDX-FileCopyrightText: 2023 Samuel Meenzen
  3. # SPDX-FileCopyrightText: 2024 - 2025 Slavi Pantaleev
  4. # SPDX-FileCopyrightText: 2024 Suguru Hirahara
  5. #
  6. # SPDX-License-Identifier: AGPL-3.0-or-later
  7. ---
  8. # mautrix-wsproxy is a Matrix <-> websocket bridge
  9. # See: https://github.com/mautrix/wsproxy
  10. matrix_mautrix_wsproxy_enabled: true
  11. matrix_mautrix_wsproxy_version: latest
  12. # See: https://mau.dev/mautrix/wsproxy/container_registry
  13. matrix_mautrix_wsproxy_container_image: "{{ matrix_mautrix_wsproxy_container_image_registry_prefix }}mautrix/wsproxy:{{ matrix_mautrix_wsproxy_version }}"
  14. matrix_mautrix_wsproxy_container_image_registry_prefix: "{{ matrix_mautrix_wsproxy_container_image_registry_prefix_upstream }}"
  15. matrix_mautrix_wsproxy_container_image_registry_prefix_upstream: "{{ matrix_mautrix_wsproxy_container_image_registry_prefix_upstream_default }}"
  16. matrix_mautrix_wsproxy_container_image_registry_prefix_upstream_default: "dock.mau.dev/"
  17. matrix_mautrix_wsproxy_base_path: "{{ matrix_base_data_path }}/wsproxy"
  18. matrix_mautrix_wsproxy_config_path: "{{ matrix_mautrix_wsproxy_base_path }}/config"
  19. matrix_mautrix_wsproxy_homeserver_address: ""
  20. matrix_mautrix_wsproxy_homeserver_domain: "{{ matrix_domain }}"
  21. matrix_mautrix_wsproxy_bind_port: false
  22. matrix_mautrix_wsproxy_port: 29331
  23. matrix_mautrix_wsproxy_appservice_address: "http://matrix-mautrix-wsproxy:{{ matrix_mautrix_wsproxy_port }}"
  24. matrix_mautrix_wsproxy_hostname: ""
  25. # The base container network. It will be auto-created by this role if it doesn't exist already.
  26. matrix_mautrix_wsproxy_container_network: matrix-mautrix-wsproxy
  27. matrix_mautrix_wsproxy_twitter_container_additional_networks: "{{ matrix_mautrix_wsproxy_twitter_container_additional_networks_auto + matrix_mautrix_wsproxy_twitter_container_additional_networks_custom }}"
  28. matrix_mautrix_wsproxy_twitter_container_additional_networks_auto: []
  29. matrix_mautrix_wsproxy_twitter_container_additional_networks_custom: []
  30. # matrix_mautrix_wsproxy_container_labels_traefik_enabled controls whether labels to assist a Traefik reverse-proxy will be attached to the container.
  31. # See `../templates/labels.j2` for details.
  32. #
  33. # To inject your own other container labels, see `matrix_mautrix_wsproxy_container_labels_additional_labels`.
  34. matrix_mautrix_wsproxy_container_labels_traefik_enabled: true
  35. matrix_mautrix_wsproxy_container_labels_traefik_docker_network: "{{ matrix_mautrix_wsproxy_container_network }}"
  36. matrix_mautrix_wsproxy_container_labels_traefik_hostname: "{{ matrix_mautrix_wsproxy_hostname }}"
  37. # The path prefix must either be `/` or not end with a slash (e.g. `/wsproxy`).
  38. matrix_mautrix_wsproxy_container_labels_traefik_rule: "Host(`{{ matrix_mautrix_wsproxy_container_labels_traefik_hostname }}`)"
  39. matrix_mautrix_wsproxy_container_labels_traefik_priority: 0
  40. matrix_mautrix_wsproxy_container_labels_traefik_entrypoints: web-secure
  41. matrix_mautrix_wsproxy_container_labels_traefik_tls: "{{ matrix_mautrix_wsproxy_container_labels_traefik_entrypoints != 'web' }}"
  42. matrix_mautrix_wsproxy_container_labels_traefik_tls_certResolver: default # noqa var-naming
  43. # Controls which additional headers to attach to all HTTP responses.
  44. # To add your own headers, use `matrix_mautrix_wsproxy_container_labels_traefik_additional_response_headers_custom`
  45. matrix_mautrix_wsproxy_container_labels_traefik_additional_response_headers_auto: {}
  46. matrix_mautrix_wsproxy_container_labels_traefik_additional_response_headers_custom: {}
  47. matrix_mautrix_wsproxy_container_labels_traefik_additional_response_headers: "{{ matrix_mautrix_wsproxy_container_labels_traefik_additional_response_headers_auto | combine(matrix_mautrix_wsproxy_container_labels_traefik_additional_response_headers_custom) }}"
  48. # matrix_mautrix_wsproxy_container_labels_additional_labels contains a multiline string with additional labels to add to the container label file.
  49. # See `../templates/labels.j2` for details.
  50. #
  51. # Example:
  52. # matrix_mautrix_wsproxy_container_labels_additional_labels: |
  53. # my.label=1
  54. # another.label="here"
  55. matrix_mautrix_wsproxy_container_labels_additional_labels: ''
  56. # A list of extra arguments to pass to the container
  57. matrix_mautrix_wsproxy_container_extra_arguments: []
  58. # List of systemd services that matrix-mautrix-wsproxy.service depends on.
  59. matrix_mautrix_wsproxy_systemd_required_services_list: "{{ matrix_mautrix_wsproxy_systemd_required_services_list_default + matrix_mautrix_wsproxy_systemd_required_services_list_auto + matrix_mautrix_wsproxy_systemd_required_services_list_custom }}"
  60. matrix_mautrix_wsproxy_systemd_required_services_list_default: "{{ [devture_systemd_docker_base_docker_service_name] if devture_systemd_docker_base_docker_service_name else [] }}"
  61. matrix_mautrix_wsproxy_systemd_required_services_list_auto: []
  62. matrix_mautrix_wsproxy_systemd_required_services_list_custom: []
  63. # List of systemd services that matrix-mautrix-wsproxy.service wants
  64. matrix_mautrix_wsproxy_systemd_wanted_services_list: []
  65. matrix_mautrix_androidsms_appservice_token: ''
  66. matrix_mautrix_androidsms_homeserver_token: ''
  67. matrix_mautrix_imessage_appservice_token: ''
  68. matrix_mautrix_imessage_homeserver_token: ''
  69. matrix_mautrix_androidsms_appservice_bot_username: androidsmsbot
  70. matrix_mautrix_imessage_appservice_bot_username: imessagebot
  71. # Default mautrix-wsproxy configuration template which covers the generic use case.
  72. # You can customize it by controlling the various variables inside it.
  73. #
  74. # For a more advanced customization, you can extend the default (see `matrix_mautrix_wsproxy_configuration_extension_yaml`)
  75. # or completely replace this variable with your own template.
  76. matrix_mautrix_wsproxy_configuration_yaml: "{{ lookup('template', 'templates/config.yaml.j2') }}"
  77. matrix_mautrix_wsproxy_configuration_extension_yaml: |
  78. # Your custom YAML configuration goes here.
  79. # This configuration extends the default starting configuration (`matrix_mautrix_wsproxy_configuration_yaml`).
  80. #
  81. # You can override individual variables from the default configuration, or introduce new ones.
  82. #
  83. # If you need something more special, you can take full control by
  84. # completely redefining `matrix_mautrix_wsproxy_configuration_yaml`.
  85. matrix_mautrix_wsproxy_configuration_extension: "{{ matrix_mautrix_wsproxy_configuration_extension_yaml | from_yaml if matrix_mautrix_wsproxy_configuration_extension_yaml | from_yaml is mapping else {} }}"
  86. # Holds the final configuration (a combination of the default and its extension).
  87. # You most likely don't need to touch this variable. Instead, see `matrix_mautrix_wsproxy_configuration_yaml`.
  88. matrix_mautrix_wsproxy_configuration: "{{ matrix_mautrix_wsproxy_configuration_yaml | from_yaml | combine(matrix_mautrix_wsproxy_configuration_extension, recursive=True) }}"
  89. matrix_mautrix_androidsms_registration_yaml: |
  90. id: androidsms
  91. url: {{ matrix_mautrix_wsproxy_appservice_address }}
  92. as_token: "{{ matrix_mautrix_androidsms_appservice_token }}"
  93. hs_token: "{{ matrix_mautrix_androidsms_homeserver_token }}"
  94. sender_localpart: _bot_{{ matrix_mautrix_androidsms_appservice_bot_username }}
  95. rate_limited: false
  96. namespaces:
  97. users:
  98. - regex: '@androidsms_.+:{{ matrix_mautrix_wsproxy_homeserver_domain | regex_escape }}$'
  99. exclusive: true
  100. - exclusive: true
  101. regex: '^@{{ matrix_mautrix_androidsms_appservice_bot_username | regex_escape }}:{{ matrix_mautrix_wsproxy_homeserver_domain | regex_escape }}$'
  102. matrix_mautrix_androidsms_registration: "{{ matrix_mautrix_androidsms_registration_yaml | from_yaml }}"
  103. matrix_mautrix_imessage_registration_yaml: |
  104. id: imessage
  105. url: {{ matrix_mautrix_wsproxy_appservice_address }}
  106. as_token: "{{ matrix_mautrix_imessage_appservice_token }}"
  107. hs_token: "{{ matrix_mautrix_imessage_homeserver_token }}"
  108. sender_localpart: _bot_{{ matrix_mautrix_imessage_appservice_bot_username }}
  109. rate_limited: false
  110. namespaces:
  111. users:
  112. - regex: '@imessage_.+:{{ matrix_mautrix_wsproxy_homeserver_domain | regex_escape }}$'
  113. exclusive: true
  114. - exclusive: true
  115. regex: '^@{{ matrix_mautrix_imessage_appservice_bot_username | regex_escape }}:{{ matrix_mautrix_wsproxy_homeserver_domain | regex_escape }}$'
  116. matrix_mautrix_imessage_registration: "{{ matrix_mautrix_imessage_registration_yaml | from_yaml }}"
  117. # Syncproxy-related configuration fields
  118. # renovate: datasource=docker depName=dock.mau.dev/mautrix/syncproxy
  119. matrix_mautrix_wsproxy_syncproxy_version: latest
  120. # See: https://mau.dev/mautrix/wsproxy/container_registry
  121. matrix_mautrix_wsproxy_syncproxy_container_image: "dock.mau.dev/mautrix/syncproxy:{{ matrix_mautrix_wsproxy_syncproxy_version }}"
  122. matrix_mautrix_wsproxy_syncproxy_container_extra_arguments: []
  123. matrix_mautrix_wsproxy_syncproxy_systemd_required_services_list: |-
  124. {{
  125. ([devture_systemd_docker_base_docker_service_name] if devture_systemd_docker_base_docker_service_name else [])
  126. +
  127. ['matrix-mautrix-wsproxy.service']
  128. }}
  129. matrix_mautrix_wsproxy_syncproxy_systemd_wanted_services_list: []
  130. matrix_mautrix_wsproxy_syncproxy_homeserver_url: ''
  131. matrix_mautrix_wsproxy_syncproxy_shared_secret: ''
  132. matrix_mautrix_wsproxy_syncproxy_port: 29332
  133. matrix_mautrix_wsproxy_syncproxy_appservice_address: "http://matrix-mautrix-wsproxy-syncproxy:{{ matrix_mautrix_wsproxy_syncproxy_port }}"
  134. # Database-related configuration fields
  135. #
  136. # This bridge supports Postgres and SQLite.
  137. #
  138. matrix_mautrix_wsproxy_syncproxy_database_engine: 'postgres'
  139. matrix_mautrix_wsproxy_syncproxy_database_username: 'matrix_mautrix_wsproxy_syncproxy'
  140. matrix_mautrix_wsproxy_syncproxy_database_password: ''
  141. matrix_mautrix_wsproxy_syncproxy_database_hostname: ''
  142. matrix_mautrix_wsproxy_syncproxy_database_port: 5432
  143. matrix_mautrix_wsproxy_syncproxy_database_name: 'matrix_mautrix_wsproxy_syncproxy'
  144. matrix_mautrix_signal_wsproxy_syncproxy_connection_string: 'postgres://{{ matrix_mautrix_wsproxy_syncproxy_database_username }}:{{ matrix_mautrix_wsproxy_syncproxy_database_password }}@{{ matrix_mautrix_wsproxy_syncproxy_database_hostname }}:{{ matrix_mautrix_wsproxy_syncproxy_database_port }}/{{ matrix_mautrix_wsproxy_syncproxy_database_name }}'
  145. # matrix_mautrix_wsproxy_restart_necessary controls whether the service
  146. # will be restarted (when true) or merely started (when false) by the
  147. # systemd service manager role (when conditional restart is enabled).
  148. #
  149. # This value is automatically computed during installation based on whether
  150. # any configuration files, the systemd service file, or the container image changed.
  151. # The default of `false` means "no restart needed" — appropriate when the role's
  152. # installation tasks haven't run (e.g., due to --tags skipping them).
  153. matrix_mautrix_wsproxy_restart_necessary: false
  154. # matrix_mautrix_wsproxy_syncproxy_restart_necessary controls whether the service
  155. # will be restarted (when true) or merely started (when false) by the
  156. # systemd service manager role (when conditional restart is enabled).
  157. #
  158. # This value is automatically computed during installation based on whether
  159. # any configuration files, the systemd service file, or the container image changed.
  160. # The default of `false` means "no restart needed" — appropriate when the role's
  161. # installation tasks haven't run (e.g., due to --tags skipping them).
  162. matrix_mautrix_wsproxy_syncproxy_restart_necessary: false