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

201 строка
12 KiB

  1. # SPDX-FileCopyrightText: 2021 - 2022 Aaron Raimist
  2. # SPDX-FileCopyrightText: 2021 - 2022 MDAD project contributors
  3. # SPDX-FileCopyrightText: 2021 - 2025 Slavi Pantaleev
  4. # SPDX-FileCopyrightText: 2022 Marko Weltzer
  5. # SPDX-FileCopyrightText: 2022 - 2023 Nikita Chernyi
  6. # SPDX-FileCopyrightText: 2022 Matthew Cengia
  7. # SPDX-FileCopyrightText: 2023 Samuel Meenzen
  8. # SPDX-FileCopyrightText: 2023 Pierre 'McFly' Marty
  9. #
  10. # SPDX-License-Identifier: AGPL-3.0-or-later
  11. ---
  12. # Project source code URL: https://github.com/element-hq/hydrogen-web
  13. matrix_client_hydrogen_enabled: true
  14. matrix_client_hydrogen_container_image_self_build: false
  15. matrix_client_hydrogen_container_image_self_build_repo: "https://github.com/element-hq/hydrogen-web.git"
  16. # renovate: datasource=docker depName=ghcr.io/element-hq/hydrogen-web
  17. matrix_client_hydrogen_version: v0.5.1
  18. matrix_client_hydrogen_docker_image: "{{ matrix_client_hydrogen_docker_image_registry_prefix }}element-hq/hydrogen-web:{{ matrix_client_hydrogen_version }}"
  19. matrix_client_hydrogen_docker_image_registry_prefix: "{{ 'localhost/' if matrix_client_hydrogen_container_image_self_build else matrix_client_hydrogen_docker_image_registry_prefix_upstream }}"
  20. matrix_client_hydrogen_docker_image_registry_prefix_upstream: "{{ matrix_client_hydrogen_docker_image_registry_prefix_upstream_default }}"
  21. matrix_client_hydrogen_docker_image_registry_prefix_upstream_default: ghcr.io/
  22. matrix_client_hydrogen_docker_image_force_pull: "{{ matrix_client_hydrogen_docker_image.endswith(':latest') }}"
  23. matrix_client_hydrogen_data_path: "{{ matrix_base_data_path }}/client-hydrogen"
  24. matrix_client_hydrogen_docker_src_files_path: "{{ matrix_client_hydrogen_data_path }}/docker-src"
  25. # The base container network
  26. matrix_client_hydrogen_container_network: ''
  27. # A list of additional container networks that the container would be connected to.
  28. # The role does not create these networks, so make sure they already exist.
  29. # Use this to expose this container to a reverse proxy, which runs in a different container network.
  30. matrix_client_hydrogen_container_additional_networks: []
  31. # Controls whether the container exposes its HTTP port (tcp/8080 in the container).
  32. #
  33. # Takes an "<ip>:<port>" or "<port>" value (e.g. "127.0.0.1:8768"), or empty string to not expose.
  34. matrix_client_hydrogen_container_http_host_bind_port: ''
  35. # matrix_client_hydrogen_container_labels_traefik_enabled controls whether labels to assist a Traefik reverse-proxy will be attached to the container.
  36. # See `../templates/labels.j2` for details.
  37. #
  38. # To inject your own other container labels, see `matrix_client_hydrogen_container_labels_additional_labels`.
  39. matrix_client_hydrogen_container_labels_traefik_enabled: true
  40. matrix_client_hydrogen_container_labels_traefik_docker_network: "{{ matrix_client_hydrogen_container_network }}"
  41. matrix_client_hydrogen_container_labels_traefik_hostname: "{{ matrix_client_hydrogen_hostname }}"
  42. # The path prefix must either be `/` or not end with a slash (e.g. `/hydrogen`).
  43. matrix_client_hydrogen_container_labels_traefik_path_prefix: "{{ matrix_client_hydrogen_path_prefix }}"
  44. matrix_client_hydrogen_container_labels_traefik_rule: "Host(`{{ matrix_client_hydrogen_container_labels_traefik_hostname }}`){% if matrix_client_hydrogen_container_labels_traefik_path_prefix != '/' %} && PathPrefix(`{{ matrix_client_hydrogen_container_labels_traefik_path_prefix }}`){% endif %}"
  45. matrix_client_hydrogen_container_labels_traefik_priority: 0
  46. matrix_client_hydrogen_container_labels_traefik_entrypoints: web-secure
  47. matrix_client_hydrogen_container_labels_traefik_tls: "{{ matrix_client_hydrogen_container_labels_traefik_entrypoints != 'web' }}"
  48. matrix_client_hydrogen_container_labels_traefik_tls_certResolver: default # noqa var-naming
  49. # Controls whether a compression middleware will be injected into the middlewares list.
  50. # This compression middleware is supposed to be defined elsewhere (using labels or a File provider, etc.) and is merely referenced by this router.
  51. matrix_client_hydrogen_container_labels_traefik_compression_middleware_enabled: false
  52. matrix_client_hydrogen_container_labels_traefik_compression_middleware_name: ""
  53. # Controls which additional headers to attach to all HTTP responses.
  54. # To add your own headers, use `matrix_client_hydrogen_container_labels_traefik_additional_response_headers_custom`
  55. matrix_client_hydrogen_container_labels_traefik_additional_response_headers: "{{ matrix_client_hydrogen_container_labels_traefik_additional_response_headers_auto | combine(matrix_client_hydrogen_container_labels_traefik_additional_response_headers_custom) }}"
  56. matrix_client_hydrogen_container_labels_traefik_additional_response_headers_auto: |
  57. {{
  58. {}
  59. | combine ({'X-XSS-Protection': matrix_client_hydrogen_http_header_xss_protection} if matrix_client_hydrogen_http_header_xss_protection else {})
  60. | combine ({'X-Frame-Options': matrix_client_hydrogen_http_header_frame_options} if matrix_client_hydrogen_http_header_frame_options else {})
  61. | combine ({'X-Content-Type-Options': matrix_client_hydrogen_http_header_content_type_options} if matrix_client_hydrogen_http_header_content_type_options else {})
  62. | combine ({'Content-Security-Policy': matrix_client_hydrogen_http_header_content_security_policy} if matrix_client_hydrogen_http_header_content_security_policy else {})
  63. | combine ({'Permission-Policy': matrix_client_hydrogen_http_header_content_permission_policy} if matrix_client_hydrogen_http_header_content_permission_policy else {})
  64. | combine ({'Strict-Transport-Security': matrix_client_hydrogen_http_header_strict_transport_security} if matrix_client_hydrogen_http_header_strict_transport_security and matrix_client_hydrogen_container_labels_traefik_tls else {})
  65. }}
  66. matrix_client_hydrogen_container_labels_traefik_additional_response_headers_custom: {}
  67. # matrix_client_hydrogen_container_labels_additional_labels contains a multiline string with additional labels to add to the container label file.
  68. # See `../templates/labels.j2` for details.
  69. #
  70. # Example:
  71. # matrix_client_hydrogen_container_labels_additional_labels: |
  72. # my.label=1
  73. # another.label="here"
  74. matrix_client_hydrogen_container_labels_additional_labels: ''
  75. # A list of extra arguments to pass to the container
  76. matrix_client_hydrogen_container_extra_arguments: []
  77. # List of systemd services that matrix-client-hydrogen.service depends on
  78. matrix_client_hydrogen_systemd_required_services_list: "{{ [devture_systemd_docker_base_docker_service_name] if devture_systemd_docker_base_docker_service_name else [] }}"
  79. # Specifies the value of the `X-XSS-Protection` header
  80. # Stops pages from loading when they detect reflected cross-site scripting (XSS) attacks.
  81. #
  82. # Learn more about it is here:
  83. # - https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-XSS-Protection
  84. # - https://portswigger.net/web-security/cross-site-scripting/reflected
  85. matrix_client_hydrogen_http_header_xss_protection: "1; mode=block"
  86. # Specifies the value of the `X-Frame-Options` header which controls whether framing can happen.
  87. # See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options
  88. matrix_client_hydrogen_http_header_frame_options: SAMEORIGIN
  89. # Specifies the value of the `X-Content-Type-Options` header.
  90. # See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Content-Type-Options
  91. matrix_client_hydrogen_http_header_content_type_options: nosniff
  92. # Specifies the value of the `Content-Security-Policy` header.
  93. # See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy
  94. matrix_client_hydrogen_http_header_content_security_policy: frame-ancestors 'self'
  95. # Specifies the value of the `Permission-Policy` header.
  96. # See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Permission-Policy
  97. matrix_client_hydrogen_http_header_content_permission_policy: "{{ 'interest-cohort=()' if matrix_client_hydrogen_floc_optout_enabled else '' }}"
  98. # Specifies the value of the `Strict-Transport-Security` header.
  99. # See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security
  100. matrix_client_hydrogen_http_header_strict_transport_security: "max-age=31536000; includeSubDomains{{ '; preload' if matrix_client_hydrogen_hsts_preload_enabled else '' }}"
  101. # Controls whether to send a "Permissions-Policy interest-cohort=();" header along with all responses
  102. #
  103. # Learn more about what it is here:
  104. # - https://www.eff.org/deeplinks/2021/03/googles-floc-terrible-idea
  105. # - https://paramdeo.com/blog/opting-your-website-out-of-googles-floc-network
  106. # - https://amifloced.org/
  107. #
  108. # Of course, a better solution is to just stop using browsers (like Chrome), which participate in such tracking practices.
  109. # See: `matrix_client_hydrogen_content_permission_policy`
  110. matrix_client_hydrogen_floc_optout_enabled: true
  111. # Controls if HSTS preloading is enabled
  112. #
  113. # In its strongest and recommended form, the [HSTS policy](https://www.chromium.org/hsts) includes all subdomains, and
  114. # indicates a willingness to be "preloaded" into browsers:
  115. # `Strict-Transport-Security: max-age=31536000; includeSubDomains; preload`
  116. # For more information visit:
  117. # - https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security
  118. # - https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security
  119. # - https://hstspreload.org/#opt-in
  120. # See: `matrix_client_hydrogen_http_header_strict_transport_security`
  121. matrix_client_hydrogen_hsts_preload_enabled: false
  122. matrix_client_hydrogen_scheme: https
  123. # The hostname at which Hydrogen is served.
  124. matrix_client_hydrogen_hostname: "{{ matrix_server_fqn_hydrogen }}"
  125. # The path at which Hydrogen is exposed.
  126. # This value must either be `/` or not end with a slash (e.g. `/hydrogen`).
  127. matrix_client_hydrogen_path_prefix: /
  128. # Controls whether the self-check feature should validate SSL certificates.
  129. matrix_client_hydrogen_self_check_validate_certificates: true
  130. # config.json
  131. matrix_client_hydrogen_push:
  132. appId: io.element.hydrogen.web
  133. gatewayUrl: https://matrix.org
  134. applicationServerKey: "BC-gpSdVHEXhvHSHS0AzzWrQoukv2BE7KzpoPO_FfPacqOo3l1pdqz7rSgmB04pZCWaHPz7XRe6fjLaC-WPDopM"
  135. matrix_client_hydrogen_default_hs_url: ""
  136. matrix_client_hydrogen_bugReportEndpointUrl: "https://element.io/bugreports/submit" # noqa var-naming
  137. # Default Hydrogen configuration template which covers the generic use case.
  138. # You can customize it by controlling the various variables inside it.
  139. #
  140. # For a more advanced customization, you can extend the default (see `matrix_client_hydrogen_configuration_extension_json`)
  141. # or completely replace this variable with your own template.
  142. #
  143. # The side-effect of this lookup is that Ansible would even parse the JSON for us, returning a dict.
  144. # This is unlike what it does when looking up YAML template files (no automatic parsing there).
  145. matrix_client_hydrogen_configuration_default: "{{ lookup('template', 'templates/config.json.j2') }}"
  146. # Your custom JSON configuration for Hydrogen should go to `matrix_client_hydrogen_configuration_extension_json`.
  147. # This configuration extends the default starting configuration (`matrix_client_hydrogen_configuration_default`).
  148. #
  149. # You can override individual variables from the default configuration, or introduce new ones.
  150. #
  151. # If you need something more special, you can take full control by
  152. # completely redefining `matrix_client_hydrogen_configuration_default`.
  153. #
  154. # Example configuration extension follows:
  155. #
  156. # matrix_client_hydrogen_configuration_extension_json: |
  157. # {
  158. # "push": {
  159. # "appId": "io.element.hydrogen.web",
  160. # "gatewayUrl": "https://matrix.org",
  161. # "applicationServerKey": "BC-gpSdVHEXhvHSHS0AzzWrQoukv2BE7KzpoPO_FfPacqOo3l1pdqz7rSgmB04pZCWaHPz7XRe6fjLaC-WPDopM"
  162. # },
  163. # "defaultHomeServer": "matrix.org"
  164. # }
  165. matrix_client_hydrogen_configuration_extension_json: '{}'
  166. matrix_client_hydrogen_configuration_extension: "{{ matrix_client_hydrogen_configuration_extension_json | from_json if matrix_client_hydrogen_configuration_extension_json | from_json is mapping else {} }}"
  167. # Holds the final Hydrogen configuration (a combination of the default and its extension).
  168. # You most likely don't need to touch this variable. Instead, see `matrix_client_hydrogen_configuration_default`.
  169. matrix_client_hydrogen_configuration: "{{ matrix_client_hydrogen_configuration_default | combine(matrix_client_hydrogen_configuration_extension, recursive=True) }}"