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

226 строки
13 KiB

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