Matrix Docker Ansible eploy
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

232 regels
14 KiB

  1. ---
  2. # mautrix-telegram is a Matrix <-> Telegram bridge
  3. # Project source code URL: https://github.com/mautrix/telegram
  4. matrix_mautrix_telegram_enabled: true
  5. matrix_mautrix_telegram_scheme: https
  6. matrix_mautrix_telegram_hostname: ''
  7. matrix_mautrix_telegram_path_prefix: ''
  8. matrix_telegram_lottieconverter_container_image_self_build: false
  9. matrix_telegram_lottieconverter_container_image_self_build_mask_arch: false
  10. matrix_telegram_lottieconverter_docker_repo: "https://mau.dev/tulir/lottieconverter.git"
  11. matrix_telegram_lottieconverter_docker_repo_version: "master"
  12. matrix_telegram_lottieconverter_docker_src_files_path: "{{ matrix_base_data_path }}/lotticonverter/docker-src"
  13. matrix_telegram_lottieconverter_docker_image: "{{ matrix_telegram_lottieconverter_docker_image_name_prefix }}tulir/lottieconverter:alpine-3.16" # needs to be adjusted according to the FROM clause of Dockerfile of mautrix-telegram
  14. matrix_telegram_lottieconverter_docker_image_name_prefix: "{{ 'localhost/' if matrix_telegram_lottieconverter_container_image_self_build else 'dock.mau.dev/' }}"
  15. matrix_mautrix_telegram_container_image_self_build: false
  16. matrix_mautrix_telegram_docker_repo: "https://mau.dev/mautrix/telegram.git"
  17. matrix_mautrix_telegram_docker_repo_version: "{{ 'master' if matrix_mautrix_telegram_version == 'latest' else matrix_mautrix_telegram_version }}"
  18. matrix_mautrix_telegram_docker_src_files_path: "{{ matrix_base_data_path }}/mautrix-telegram/docker-src"
  19. # renovate: datasource=docker depName=dock.mau.dev/mautrix/telegram
  20. matrix_mautrix_telegram_version: v0.15.2
  21. # See: https://mau.dev/mautrix/telegram/container_registry
  22. matrix_mautrix_telegram_docker_image: "{{ matrix_mautrix_telegram_docker_image_name_prefix }}mautrix/telegram:{{ matrix_mautrix_telegram_version }}"
  23. matrix_mautrix_telegram_docker_image_name_prefix: "{{ 'localhost/' if matrix_mautrix_telegram_container_image_self_build else 'dock.mau.dev/' }}"
  24. matrix_mautrix_telegram_docker_image_force_pull: "{{ matrix_mautrix_telegram_docker_image.endswith(':latest') }}"
  25. matrix_mautrix_telegram_base_path: "{{ matrix_base_data_path }}/mautrix-telegram"
  26. matrix_mautrix_telegram_config_path: "{{ matrix_mautrix_telegram_base_path }}/config"
  27. matrix_mautrix_telegram_data_path: "{{ matrix_mautrix_telegram_base_path }}/data"
  28. matrix_mautrix_telegram_command_prefix: "!tg"
  29. matrix_mautrix_telegram_bridge_permissions: |
  30. {{
  31. {'*': 'relaybot', matrix_mautrix_telegram_homeserver_domain: 'full'}
  32. | combine({matrix_admin: 'admin'} if matrix_admin else {})
  33. }}
  34. # Get your own API keys at https://my.telegram.org/apps
  35. matrix_mautrix_telegram_api_id: ''
  36. matrix_mautrix_telegram_api_hash: ''
  37. matrix_mautrix_telegram_bot_token: disabled
  38. # Define the filter-mode
  39. matrix_mautrix_telegram_filter_mode: "blacklist"
  40. # Whether or not the public-facing endpoints should be enabled (web-based login)
  41. matrix_mautrix_telegram_appservice_public_enabled: true
  42. # Mautrix telegram public endpoint to log in to telegram
  43. # Use an uuid so it's not easily discoverable.
  44. # Example: /741a0483-ba17-4682-9900-30bd7269f1cc
  45. matrix_mautrix_telegram_public_endpoint: "{{ matrix_mautrix_telegram_path_prefix }}"
  46. matrix_mautrix_telegram_homeserver_address: ""
  47. matrix_mautrix_telegram_homeserver_domain: '{{ matrix_domain }}'
  48. matrix_mautrix_telegram_appservice_address: 'http://matrix-mautrix-telegram:8080'
  49. matrix_mautrix_telegram_appservice_public_external: '{{ matrix_mautrix_telegram_scheme }}://{{ matrix_mautrix_telegram_hostname }}{{ matrix_mautrix_telegram_public_endpoint }}'
  50. matrix_mautrix_telegram_appservice_bot_username: telegrambot
  51. # Specifies the default log level for all bridge loggers.
  52. matrix_mautrix_telegram_logging_level: WARNING
  53. # Whether or not created rooms should have federation enabled.
  54. # If false, created portal rooms will never be federated.
  55. matrix_mautrix_telegram_federate_rooms: true
  56. # Controls whether the matrix-mautrix-telegram container exposes its HTTP port (tcp/8080 in the container).
  57. #
  58. # Takes an "<ip>:<port>" or "<port>" value (e.g. "127.0.0.1:9006"), or empty string to not expose.
  59. matrix_mautrix_telegram_container_http_host_bind_port: ''
  60. matrix_mautrix_telegram_container_network: ""
  61. matrix_mautrix_telegram_container_additional_networks: "{{ matrix_mautrix_telegram_container_additional_networks_auto + matrix_mautrix_telegram_container_additional_networks_custom }}"
  62. matrix_mautrix_telegram_container_additional_networks_auto: []
  63. matrix_mautrix_telegram_container_additional_networks_custom: []
  64. # matrix_mautrix_telegram_container_labels_traefik_enabled controls whether labels to assist a Traefik reverse-proxy will be attached to the container.
  65. # See `../templates/labels.j2` for details.
  66. #
  67. # To inject your own other container labels, see `matrix_mautrix_telegram_container_labels_additional_labels`.
  68. matrix_mautrix_telegram_container_labels_traefik_enabled: true
  69. matrix_mautrix_telegram_container_labels_traefik_docker_network: "{{ matrix_mautrix_telegram_container_network }}"
  70. matrix_mautrix_telegram_container_labels_traefik_entrypoints: web-secure
  71. matrix_mautrix_telegram_container_labels_traefik_tls_certResolver: default # noqa var-naming
  72. # Controls whether labels will be added that expose mautrix-telegram's public endpoint
  73. matrix_mautrix_telegram_container_labels_public_endpoint_enabled: "{{ matrix_mautrix_telegram_appservice_public_enabled }}"
  74. matrix_mautrix_telegram_container_labels_public_endpoint_hostname: "{{ matrix_mautrix_telegram_hostname }}"
  75. matrix_mautrix_telegram_container_labels_public_endpoint_path_prefix: "{{ matrix_mautrix_telegram_path_prefix }}"
  76. matrix_mautrix_telegram_container_labels_public_endpoint_traefik_rule: "Host(`{{ matrix_mautrix_telegram_container_labels_public_endpoint_hostname }}`) && PathPrefix(`{{ matrix_mautrix_telegram_container_labels_public_endpoint_path_prefix }}`)"
  77. matrix_mautrix_telegram_container_labels_public_endpoint_traefik_priority: 0
  78. matrix_mautrix_telegram_container_labels_public_endpoint_traefik_entrypoints: "{{ matrix_mautrix_telegram_container_labels_traefik_entrypoints }}"
  79. matrix_mautrix_telegram_container_labels_public_endpoint_traefik_tls: "{{ matrix_mautrix_telegram_container_labels_public_endpoint_traefik_entrypoints != 'web' }}"
  80. matrix_mautrix_telegram_container_labels_public_endpoint_traefik_tls_certResolver: "{{ matrix_mautrix_telegram_container_labels_traefik_tls_certResolver }}" # noqa var-naming
  81. # Controls whether labels will be added that expose mautrix-telegram's metrics
  82. matrix_mautrix_telegram_container_labels_metrics_enabled: "{{ matrix_mautrix_telegram_metrics_enabled and matrix_mautrix_telegram_metrics_proxying_enabled }}"
  83. matrix_mautrix_telegram_container_labels_metrics_traefik_rule: "Host(`{{ matrix_mautrix_telegram_metrics_proxying_hostname }}`) && PathPrefix(`{{ matrix_mautrix_telegram_metrics_proxying_path_prefix }}`)"
  84. matrix_mautrix_telegram_container_labels_metrics_traefik_priority: 0
  85. matrix_mautrix_telegram_container_labels_metrics_traefik_entrypoints: "{{ matrix_mautrix_telegram_container_labels_traefik_entrypoints }}"
  86. matrix_mautrix_telegram_container_labels_metrics_traefik_tls: "{{ matrix_mautrix_telegram_container_labels_metrics_traefik_entrypoints != 'web' }}"
  87. matrix_mautrix_telegram_container_labels_metrics_traefik_tls_certResolver: "{{ matrix_mautrix_telegram_container_labels_traefik_tls_certResolver }}" # noqa var-naming
  88. matrix_mautrix_telegram_container_labels_metrics_middleware_basic_auth_enabled: false
  89. # See: https://doc.traefik.io/traefik/middlewares/http/basicauth/#users
  90. matrix_mautrix_telegram_container_labels_metrics_middleware_basic_auth_users: ''
  91. # matrix_mautrix_telegram_container_labels_additional_labels contains a multiline string with additional labels to add to the container label file.
  92. # See `../templates/labels.j2` for details.
  93. #
  94. # Example:
  95. # matrix_mautrix_telegram_container_labels_additional_labels: |
  96. # my.label=1
  97. # another.label="here"
  98. matrix_mautrix_telegram_container_labels_additional_labels: ''
  99. # A list of extra arguments to pass to the container
  100. matrix_mautrix_telegram_container_extra_arguments: []
  101. # List of systemd services that matrix-mautrix-telegram.service depends on.
  102. matrix_mautrix_telegram_systemd_required_services_list: "{{ matrix_mautrix_telegram_systemd_required_services_list_default + matrix_mautrix_telegram_systemd_required_services_list_auto + matrix_mautrix_telegram_systemd_required_services_list_custom }}"
  103. matrix_mautrix_telegram_systemd_required_services_list_default: "{{ [devture_systemd_docker_base_docker_service_name] if devture_systemd_docker_base_docker_service_name else [] }}"
  104. matrix_mautrix_telegram_systemd_required_services_list_auto: []
  105. matrix_mautrix_telegram_systemd_required_services_list_custom: []
  106. # List of systemd services that matrix-mautrix-telegram.service wants
  107. matrix_mautrix_telegram_systemd_wanted_services_list: []
  108. matrix_mautrix_telegram_appservice_token: ''
  109. matrix_mautrix_telegram_homeserver_token: ''
  110. # Whether or not metrics endpoint should be enabled.
  111. # Enabling them is usually enough for a local (in-container) Prometheus to consume them.
  112. # If metrics need to be consumed by another (external) Prometheus server, consider exposing them via `matrix_mautrix_telegram_metrics_proxying_enabled`.
  113. matrix_mautrix_telegram_metrics_enabled: false
  114. # Controls whether metrics should be exposed on a public URL.
  115. matrix_mautrix_telegram_metrics_proxying_enabled: false
  116. matrix_mautrix_telegram_metrics_proxying_hostname: ''
  117. matrix_mautrix_telegram_metrics_proxying_path_prefix: ''
  118. # Database-related configuration fields.
  119. #
  120. # To use SQLite, stick to these defaults.
  121. #
  122. # To use Postgres:
  123. # - change the engine (`matrix_mautrix_telegram_database_engine: 'postgres'`)
  124. # - adjust your database credentials via the `matrix_mautrix_telegram_database_*` variables
  125. matrix_mautrix_telegram_database_engine: 'sqlite'
  126. matrix_mautrix_telegram_sqlite_database_path_local: "{{ matrix_mautrix_telegram_data_path }}/mautrix-telegram.db"
  127. matrix_mautrix_telegram_sqlite_database_path_in_container: "/data/mautrix-telegram.db"
  128. matrix_mautrix_telegram_database_username: 'matrix_mautrix_telegram'
  129. matrix_mautrix_telegram_database_password: 'some-password'
  130. matrix_mautrix_telegram_database_hostname: ''
  131. matrix_mautrix_telegram_database_port: 5432
  132. matrix_mautrix_telegram_database_name: 'matrix_mautrix_telegram'
  133. matrix_mautrix_telegram_database_connection_string: 'postgres://{{ matrix_mautrix_telegram_database_username }}:{{ matrix_mautrix_telegram_database_password }}@{{ matrix_mautrix_telegram_database_hostname }}:{{ matrix_mautrix_telegram_database_port }}/{{ matrix_mautrix_telegram_database_name }}'
  134. matrix_mautrix_telegram_appservice_database: "{{
  135. {
  136. 'sqlite': ('sqlite:///' + matrix_mautrix_telegram_sqlite_database_path_in_container),
  137. 'postgres': matrix_mautrix_telegram_database_connection_string,
  138. }[matrix_mautrix_telegram_database_engine]
  139. }}"
  140. matrix_mautrix_telegram_bridge_login_shared_secret_map: "{{ matrix_mautrix_telegram_bridge_login_shared_secret_map_auto | combine(matrix_mautrix_telegram_bridge_login_shared_secret_map_custom) }}"
  141. matrix_mautrix_telegram_bridge_login_shared_secret_map_auto: {}
  142. matrix_mautrix_telegram_bridge_login_shared_secret_map_custom: {}
  143. # Default configuration template which covers the generic use case.
  144. # You can customize it by controlling the various variables inside it.
  145. #
  146. # For a more advanced customization, you can extend the default (see `matrix_mautrix_telegram_configuration_extension_yaml`)
  147. # or completely replace this variable with your own template.
  148. matrix_mautrix_telegram_configuration_yaml: "{{ lookup('template', 'templates/config.yaml.j2') }}"
  149. matrix_mautrix_telegram_configuration_extension_yaml: |
  150. # Your custom YAML configuration goes here.
  151. # This configuration extends the default starting configuration (`matrix_mautrix_telegram_configuration_yaml`).
  152. #
  153. # You can override individual variables from the default configuration, or introduce new ones.
  154. #
  155. # If you need something more special, you can take full control by
  156. # completely redefining `matrix_mautrix_telegram_configuration_yaml`.
  157. matrix_mautrix_telegram_configuration_extension: "{{ matrix_mautrix_telegram_configuration_extension_yaml | from_yaml if matrix_mautrix_telegram_configuration_extension_yaml | from_yaml is mapping else {} }}"
  158. # Holds the final configuration (a combination of the default and its extension).
  159. # You most likely don't need to touch this variable. Instead, see `matrix_mautrix_telegram_configuration_yaml`.
  160. matrix_mautrix_telegram_configuration: "{{ matrix_mautrix_telegram_configuration_yaml | from_yaml | combine(matrix_mautrix_telegram_configuration_extension, recursive=True) }}"
  161. matrix_mautrix_telegram_registration_yaml: |
  162. id: telegram
  163. as_token: "{{ matrix_mautrix_telegram_appservice_token }}"
  164. hs_token: "{{ matrix_mautrix_telegram_homeserver_token }}"
  165. namespaces:
  166. users:
  167. - exclusive: true
  168. regex: '^@telegram_.+:{{ matrix_mautrix_telegram_homeserver_domain | regex_escape }}$'
  169. - exclusive: true
  170. regex: '^@{{ matrix_mautrix_telegram_appservice_bot_username | regex_escape }}:{{ matrix_mautrix_telegram_homeserver_domain | regex_escape }}$'
  171. aliases:
  172. - exclusive: true
  173. regex: '^#telegram_.+:{{ matrix_mautrix_telegram_homeserver_domain | regex_escape }}$'
  174. # See https://github.com/mautrix/signal/issues/43
  175. sender_localpart: _bot_{{ matrix_mautrix_telegram_appservice_bot_username }}
  176. url: {{ matrix_mautrix_telegram_appservice_address }}
  177. rate_limited: false
  178. de.sorunome.msc2409.push_ephemeral: true
  179. matrix_mautrix_telegram_registration: "{{ matrix_mautrix_telegram_registration_yaml | from_yaml }}"
  180. # Templates for defining MXID's and displaynames for users and rooms.
  181. matrix_mautrix_telegram_username_template: 'telegram_{userid}'
  182. matrix_mautrix_telegram_alias_template: 'telegram_{groupname}'
  183. matrix_mautrix_telegram_displayname_template: '{displayname} (Telegram)'
  184. # Enable End-to-bridge encryption
  185. matrix_mautrix_telegram_bridge_encryption_allow: "{{ matrix_bridges_encryption_enabled }}"
  186. matrix_mautrix_telegram_bridge_encryption_default: "{{ matrix_bridges_encryption_default }}"
  187. matrix_mautrix_telegram_bridge_encryption_key_sharing_allow: "{{ matrix_mautrix_telegram_bridge_encryption_allow }}"