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.
 
 

239 regels
13 KiB

  1. # SPDX-FileCopyrightText: 2019 - 2021 MDAD project contributors
  2. # SPDX-FileCopyrightText: 2019 - 2025 Slavi Pantaleev
  3. # SPDX-FileCopyrightText: 2019 Dan Arnfield
  4. # SPDX-FileCopyrightText: 2019 Edgars Voroboks
  5. # SPDX-FileCopyrightText: 2019 Sylvia van Os
  6. # SPDX-FileCopyrightText: 2020 Chris van Dijk
  7. # SPDX-FileCopyrightText: 2021 Aaron Raimist
  8. # SPDX-FileCopyrightText: 2021 Ahmad Haghighi
  9. # SPDX-FileCopyrightText: 2022 Marko Weltzer
  10. # SPDX-FileCopyrightText: 2022 Nikita Chernyi
  11. # SPDX-FileCopyrightText: 2023 Samuel Meenzen
  12. # SPDX-FileCopyrightText: 2024 Suguru Hirahara
  13. #
  14. # SPDX-License-Identifier: AGPL-3.0-or-later
  15. ---
  16. # Project source code URL: https://github.com/turt2live/matrix-dimension
  17. matrix_dimension_enabled: false
  18. matrix_dimension_scheme: https
  19. # The hostname at which Dimension is served.
  20. matrix_dimension_hostname: ''
  21. # The path at which Dimension is exposed.
  22. # This value must either be `/` or not end with a slash (e.g. `/dimension`).
  23. matrix_dimension_path_prefix: /
  24. # You are required to specify an access token for Dimension to work.
  25. # For information on how to acquire an access token, visit https://t2bot.io/docs/access_tokens
  26. matrix_dimension_access_token: ""
  27. # Users in form: ['@alice:example.com', '@bob:example.com']
  28. matrix_dimension_admins: []
  29. # Whether to allow Dimension widgets serve websites with invalid or self signed SSL certificates
  30. matrix_dimension_widgets_allow_self_signed_ssl_certificates: false
  31. matrix_dimension_container_image_self_build: false
  32. matrix_dimension_container_image_self_build_repo: "https://github.com/turt2live/matrix-dimension.git"
  33. matrix_dimension_container_image_self_build_branch: master
  34. matrix_dimension_base_path: "{{ matrix_base_data_path }}/dimension"
  35. matrix_dimension_docker_src_files_path: "{{ matrix_base_data_path }}/docker-src/dimension"
  36. # renovate: datasource=docker depName=turt2live/matrix-dimension
  37. matrix_dimension_version: latest
  38. matrix_dimension_docker_image: "{{ matrix_dimension_docker_image_registry_prefix }}turt2live/matrix-dimension:{{ matrix_dimension_version }}"
  39. matrix_dimension_docker_image_registry_prefix: "{{ 'localhost/' if matrix_dimension_container_image_self_build else matrix_dimension_docker_image_registry_prefix_upstream }}"
  40. matrix_dimension_docker_image_registry_prefix_upstream: "{{ matrix_dimension_docker_image_registry_prefix_upstream_default }}"
  41. matrix_dimension_docker_image_registry_prefix_upstream_default: docker.io/
  42. matrix_dimension_docker_image_force_pull: "{{ matrix_dimension_docker_image.endswith(':latest') }}"
  43. # List of systemd services that matrix-dimension.service depends on.
  44. matrix_dimension_systemd_required_services_list: "{{ matrix_dimension_systemd_required_services_list_default + matrix_dimension_systemd_required_services_list_auto + matrix_dimension_systemd_required_services_list_custom }}"
  45. matrix_dimension_systemd_required_services_list_default: "{{ [devture_systemd_docker_base_docker_service_name] if devture_systemd_docker_base_docker_service_name else [] }}"
  46. matrix_dimension_systemd_required_services_list_auto: []
  47. matrix_dimension_systemd_required_services_list_custom: []
  48. # List of systemd services that matrix-dimension.service wants
  49. matrix_dimension_systemd_wanted_services_list: []
  50. # The user and group ID correspond to the node user in the `turt2live/matrix-dimension` image.
  51. matrix_dimension_user_uid: '1000'
  52. matrix_dimension_user_gid: '1000'
  53. # The base container network. It will be auto-created by this role if it doesn't exist already.
  54. matrix_dimension_container_network: matrix-dimension
  55. # A list of additional container networks that the container would be connected to.
  56. # The role does not create these networks, so make sure they already exist.
  57. # Use this to expose this container to another reverse proxy, which runs in a different container network.
  58. matrix_dimension_container_additional_networks: []
  59. # Controls whether the matrix-dimension container exposes its HTTP port (tcp/8184 in the container).
  60. #
  61. # Takes an "<ip>:<port>" or "<port>" value (e.g. "127.0.0.1:8184"), or empty string to not expose.
  62. matrix_dimension_container_http_host_bind_port: ''
  63. # matrix_dimension_container_labels_traefik_enabled controls whether labels to assist a Traefik reverse-proxy will be attached to the container.
  64. # See `../templates/labels.j2` for details.
  65. #
  66. # To inject your own other container labels, see `matrix_dimension_container_labels_additional_labels`.
  67. matrix_dimension_container_labels_traefik_enabled: true
  68. matrix_dimension_container_labels_traefik_docker_network: "{{ matrix_dimension_container_network }}"
  69. matrix_dimension_container_labels_traefik_hostname: "{{ matrix_dimension_hostname }}"
  70. # The path prefix must either be `/` or not end with a slash (e.g. `/dimension`).
  71. matrix_dimension_container_labels_traefik_path_prefix: "{{ matrix_dimension_path_prefix }}"
  72. matrix_dimension_container_labels_traefik_rule: "Host(`{{ matrix_dimension_container_labels_traefik_hostname }}`){% if matrix_dimension_container_labels_traefik_path_prefix != '/' %} && PathPrefix(`{{ matrix_dimension_container_labels_traefik_path_prefix }}`){% endif %}"
  73. matrix_dimension_container_labels_traefik_priority: 0
  74. matrix_dimension_container_labels_traefik_entrypoints: web-secure
  75. matrix_dimension_container_labels_traefik_tls: "{{ matrix_dimension_container_labels_traefik_entrypoints != 'web' }}"
  76. matrix_dimension_container_labels_traefik_tls_certResolver: default # noqa var-naming
  77. # Controls which additional headers to attach to all HTTP responses.
  78. # To add your own headers, use `matrix_dimension_container_labels_traefik_additional_response_headers_custom`
  79. matrix_dimension_container_labels_traefik_additional_response_headers: "{{ matrix_dimension_container_labels_traefik_additional_response_headers_auto | combine(matrix_dimension_container_labels_traefik_additional_response_headers_custom) }}"
  80. matrix_dimension_container_labels_traefik_additional_response_headers_auto: |
  81. {{
  82. {}
  83. | combine ({'X-XSS-Protection': matrix_dimension_http_header_xss_protection} if matrix_dimension_http_header_xss_protection else {})
  84. | combine ({'X-Frame-Options': matrix_dimension_http_header_frame_options} if matrix_dimension_http_header_frame_options else {})
  85. | combine ({'X-Content-Type-Options': matrix_dimension_http_header_content_type_options} if matrix_dimension_http_header_content_type_options else {})
  86. | combine ({'Content-Security-Policy': matrix_dimension_http_header_content_security_policy} if matrix_dimension_http_header_content_security_policy else {})
  87. | combine ({'Permission-Policy': matrix_dimension_http_header_content_permission_policy} if matrix_dimension_http_header_content_permission_policy else {})
  88. | combine ({'Strict-Transport-Security': matrix_dimension_http_header_strict_transport_security} if matrix_dimension_http_header_strict_transport_security and matrix_dimension_container_labels_traefik_tls else {})
  89. }}
  90. matrix_dimension_container_labels_traefik_additional_response_headers_custom: {}
  91. # matrix_dimension_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_dimension_container_labels_additional_labels: |
  96. # my.label=1
  97. # another.label="here"
  98. matrix_dimension_container_labels_additional_labels: ''
  99. # A list of extra arguments to pass to the container
  100. matrix_dimension_container_extra_arguments: []
  101. # Public facing base URL of the Dimension service.
  102. # It should not end with a slash.
  103. matrix_dimension_base_url: "{{ matrix_dimension_scheme }}://{{ matrix_dimension_hostname }}{{ '' if matrix_dimension_path_prefix == '/' else matrix_dimension_path_prefix }}"
  104. matrix_dimension_integrations_ui_url: "{{ matrix_dimension_base_url }}/element"
  105. matrix_dimension_integrations_rest_url: "{{ matrix_dimension_base_url }}/api/v1/scalar"
  106. matrix_dimension_integrations_widgets_urls: ["{{ matrix_dimension_base_url }}/widgets"]
  107. matrix_dimension_integrations_jitsi_widget_url: "{{ matrix_dimension_base_url }}/widgets/jitsi"
  108. matrix_dimension_homeserver_clientServerUrl: '' # noqa var-naming
  109. matrix_dimension_homeserver_federationUrl: '' # noqa var-naming
  110. matrix_dimension_homeserver_mediaUrl: '' # noqa var-naming
  111. # Controls the dimension.publicUrl configuration option
  112. matrix_dimension_dimension_publicUrl: "{{ matrix_dimension_base_url }}" # noqa var-naming
  113. # Specifies the value of the `X-XSS-Protection` header
  114. # Stops pages from loading when they detect reflected cross-site scripting (XSS) attacks.
  115. #
  116. # Learn more about it is here:
  117. # - https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-XSS-Protection
  118. # - https://portswigger.net/web-security/cross-site-scripting/reflected
  119. matrix_dimension_http_header_xss_protection: "1; mode=block"
  120. # Specifies the value of the `X-Frame-Options` header which controls whether framing can happen.
  121. # See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options
  122. matrix_dimension_http_header_frame_options: ''
  123. # Specifies the value of the `X-Content-Type-Options` header.
  124. # See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Content-Type-Options
  125. matrix_dimension_http_header_content_type_options: nosniff
  126. # Specifies the value of the `Content-Security-Policy` header.
  127. # See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy
  128. matrix_dimension_http_header_content_security_policy: ''
  129. # Specifies the value of the `Permission-Policy` header.
  130. # See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Permission-Policy
  131. matrix_dimension_http_header_content_permission_policy: "{{ 'interest-cohort=()' if matrix_dimension_floc_optout_enabled else '' }}"
  132. # Specifies the value of the `Strict-Transport-Security` header.
  133. # See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security
  134. matrix_dimension_http_header_strict_transport_security: "max-age=31536000; includeSubDomains{{ '; preload' if matrix_dimension_hsts_preload_enabled else '' }}"
  135. # Controls whether to send a "Permissions-Policy interest-cohort=();" header along with all responses
  136. #
  137. # Learn more about what it is here:
  138. # - https://www.eff.org/deeplinks/2021/03/googles-floc-terrible-idea
  139. # - https://paramdeo.com/blog/opting-your-website-out-of-googles-floc-network
  140. # - https://amifloced.org/
  141. #
  142. # Of course, a better solution is to just stop using browsers (like Chrome), which participate in such tracking practices.
  143. # See: `matrix_dimension_content_permission_policy`
  144. matrix_dimension_floc_optout_enabled: true
  145. # Controls if HSTS preloading is enabled
  146. #
  147. # In its strongest and recommended form, the [HSTS policy](https://www.chromium.org/hsts) includes all subdomains, and
  148. # indicates a willingness to be "preloaded" into browsers:
  149. # `Strict-Transport-Security: max-age=31536000; includeSubDomains; preload`
  150. # For more information visit:
  151. # - https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security
  152. # - https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security
  153. # - https://hstspreload.org/#opt-in
  154. # See: `matrix_dimension_http_header_strict_transport_security`
  155. matrix_dimension_hsts_preload_enabled: false
  156. # Database-related configuration fields.
  157. #
  158. # To use SQLite, stick to these defaults.
  159. #
  160. # To use Postgres:
  161. # - change the engine (`matrix_dimension_database_engine: 'postgres'`)
  162. # - adjust your database credentials via the `matrix_dimension_database_*` variables
  163. matrix_dimension_database_engine: 'sqlite'
  164. matrix_dimension_sqlite_database_path_local: "{{ matrix_dimension_base_path }}/dimension.db"
  165. matrix_dimension_sqlite_database_path_in_container: "dimension.db"
  166. matrix_dimension_database_username: 'matrix_dimension'
  167. matrix_dimension_database_password: 'some-password'
  168. matrix_dimension_database_hostname: ''
  169. matrix_dimension_database_port: 5432
  170. matrix_dimension_database_name: 'matrix_dimension'
  171. matrix_dimension_database_connection_string: 'postgres://{{ matrix_dimension_database_username }}:{{ matrix_dimension_database_password }}@{{ matrix_dimension_database_hostname }}:{{ matrix_dimension_database_port }}/{{ matrix_dimension_database_name }}'
  172. # Default Dimension configuration template which covers the generic use case.
  173. # You can customize it by controlling the various variables inside it.
  174. #
  175. # For a more advanced customization, you can extend the default (see `matrix_dimension_configuration_extension_yaml`)
  176. # or completely replace this variable with your own template.
  177. matrix_dimension_configuration_yaml: "{{ lookup('template', 'templates/config.yaml.j2') }}"
  178. matrix_dimension_configuration_extension_yaml: |
  179. # Your custom YAML configuration for Dimension goes here.
  180. # This configuration extends the default starting configuration (`matrix_dimension_configuration_yaml`).
  181. #
  182. # You can override individual variables from the default configuration, or introduce new ones.
  183. #
  184. # If you need something more special, you can take full control by
  185. # completely redefining `matrix_dimension_configuration_yaml`.
  186. #
  187. # Example configuration extension follows:
  188. # telegram:
  189. # botToken: "YourTokenHere"
  190. #
  191. matrix_dimension_configuration_extension: "{{ matrix_dimension_configuration_extension_yaml | from_yaml if matrix_dimension_configuration_extension_yaml | from_yaml is mapping else {} }}"
  192. # Holds the final Dimension configuration (a combination of the default and its extension).
  193. # You most likely don't need to touch this variable. Instead, see `matrix_dimension_configuration_yaml`.
  194. matrix_dimension_configuration: "{{ matrix_dimension_configuration_yaml | from_yaml | combine(matrix_dimension_configuration_extension, recursive=True) }}"