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.
 
 

194 lines
10 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 - 2023 Nikita Chernyi
  5. # SPDX-FileCopyrightText: 2022 Marko Weltzer
  6. # SPDX-FileCopyrightText: 2022 Matthew Cengia
  7. # SPDX-FileCopyrightText: 2023 Pierre 'McFly' Marty
  8. # SPDX-FileCopyrightText: 2023 Samuel Meenzen
  9. #
  10. # SPDX-License-Identifier: AGPL-3.0-or-later
  11. ---
  12. # Project source code URL: https://github.com/element-hq/hydrogen-web
  13. hydrogen_enabled: true
  14. hydrogen_container_image_self_build: false
  15. 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. hydrogen_version: v0.5.1
  18. hydrogen_container_image: "{{ hydrogen_container_image_registry_prefix }}element-hq/hydrogen-web:{{ hydrogen_version }}"
  19. hydrogen_container_image_registry_prefix_upstream_default: ghcr.io/
  20. hydrogen_container_image_force_pull: "{{ hydrogen_container_image.endswith(':latest') }}"
  21. hydrogen_base_path: "{{ matrix_base_data_path }}/client-hydrogen"
  22. hydrogen_docker_src_files_path: "{{ hydrogen_base_path }}/docker-src"
  23. # The base container network
  24. hydrogen_container_network: ''
  25. # A list of additional container networks that the container would be connected to.
  26. # The role does not create these networks, so make sure they already exist.
  27. # Use this to expose this container to a reverse proxy, which runs in a different container network.
  28. hydrogen_container_additional_networks: []
  29. # Controls whether the container exposes its HTTP port (tcp/8080 in the container).
  30. #
  31. # Takes an "<ip>:<port>" or "<port>" value (e.g. "127.0.0.1:8768"), or empty string to not expose.
  32. hydrogen_container_http_host_bind_port: ''
  33. # hydrogen_container_labels_traefik_enabled controls whether labels to assist a Traefik reverse-proxy will be attached to the container.
  34. # See `../templates/labels.j2` for details.
  35. #
  36. # To inject your own other container labels, see `hydrogen_container_labels_additional_labels`.
  37. hydrogen_container_labels_traefik_enabled: true
  38. hydrogen_container_labels_traefik_docker_network: "{{ hydrogen_container_network }}"
  39. hydrogen_container_labels_traefik_hostname: "{{ hydrogen_hostname }}"
  40. # The path prefix must either be `/` or not end with a slash (e.g. `/hydrogen`).
  41. hydrogen_container_labels_traefik_path_prefix: "{{ hydrogen_path_prefix }}"
  42. hydrogen_container_labels_traefik_rule: "Host(`{{ hydrogen_container_labels_traefik_hostname }}`){% if hydrogen_container_labels_traefik_path_prefix != '/' %} && PathPrefix(`{{ hydrogen_container_labels_traefik_path_prefix }}`){% endif %}"
  43. hydrogen_container_labels_traefik_priority: 0
  44. hydrogen_container_labels_traefik_entrypoints: web-secure
  45. hydrogen_container_labels_traefik_tls: "{{ hydrogen_container_labels_traefik_entrypoints != 'web' }}"
  46. hydrogen_container_labels_traefik_tls_certResolver: default # noqa var-naming
  47. # Controls whether a compression middleware will be injected into the middlewares list.
  48. # This compression middleware is supposed to be defined elsewhere (using labels or a File provider, etc.) and is merely referenced by this router.
  49. hydrogen_container_labels_traefik_compression_middleware_enabled: false
  50. hydrogen_container_labels_traefik_compression_middleware_name: ""
  51. # Controls which additional headers to attach to all HTTP responses.
  52. # To add your own headers, use `hydrogen_container_labels_traefik_additional_response_headers_custom`
  53. hydrogen_container_labels_traefik_additional_response_headers: "{{ hydrogen_container_labels_traefik_additional_response_headers_auto | combine(hydrogen_container_labels_traefik_additional_response_headers_custom) }}"
  54. hydrogen_container_labels_traefik_additional_response_headers_auto: |
  55. {{
  56. {}
  57. | combine ({'X-XSS-Protection': hydrogen_http_header_xss_protection} if hydrogen_http_header_xss_protection else {})
  58. | combine ({'X-Content-Type-Options': hydrogen_http_header_content_type_options} if hydrogen_http_header_content_type_options else {})
  59. | combine ({'Content-Security-Policy': hydrogen_http_header_content_security_policy} if hydrogen_http_header_content_security_policy else {})
  60. | combine ({'Permission-Policy': hydrogen_http_header_content_permission_policy} if hydrogen_http_header_content_permission_policy else {})
  61. | combine ({'Strict-Transport-Security': hydrogen_http_header_strict_transport_security} if hydrogen_http_header_strict_transport_security and hydrogen_container_labels_traefik_tls else {})
  62. }}
  63. hydrogen_container_labels_traefik_additional_response_headers_custom: {}
  64. # hydrogen_container_labels_additional_labels contains a multiline string with additional labels to add to the container label file.
  65. # See `../templates/labels.j2` for details.
  66. #
  67. # Example:
  68. # hydrogen_container_labels_additional_labels: |
  69. # my.label=1
  70. # another.label="here"
  71. hydrogen_container_labels_additional_labels: ''
  72. # A list of extra arguments to pass to the container
  73. hydrogen_container_extra_arguments: []
  74. # List of systemd services that hydrogen.service depends on
  75. hydrogen_systemd_required_services_list: "{{ [devture_systemd_docker_base_docker_service_name] if devture_systemd_docker_base_docker_service_name else [] }}"
  76. # Specifies the value of the `X-XSS-Protection` header
  77. # Stops pages from loading when they detect reflected cross-site scripting (XSS) attacks.
  78. #
  79. # Learn more about it is here:
  80. # - https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-XSS-Protection
  81. # - https://portswigger.net/web-security/cross-site-scripting/reflected
  82. hydrogen_http_header_xss_protection: "1; mode=block"
  83. # Specifies the value of the `X-Content-Type-Options` header.
  84. # See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Content-Type-Options
  85. hydrogen_http_header_content_type_options: nosniff
  86. # Specifies the value of the `Content-Security-Policy` header.
  87. # See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy
  88. hydrogen_http_header_content_security_policy: frame-ancestors 'self'
  89. # Specifies the value of the `Permission-Policy` header.
  90. # See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Permission-Policy
  91. hydrogen_http_header_content_permission_policy: "{{ 'interest-cohort=()' if hydrogen_floc_optout_enabled else '' }}"
  92. # Specifies the value of the `Strict-Transport-Security` header.
  93. # See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security
  94. hydrogen_http_header_strict_transport_security: "max-age=31536000; includeSubDomains{{ '; preload' if hydrogen_hsts_preload_enabled else '' }}"
  95. # Controls whether to send a "Permissions-Policy interest-cohort=();" header along with all responses
  96. #
  97. # Learn more about what it is here:
  98. # - https://www.eff.org/deeplinks/2021/03/googles-floc-terrible-idea
  99. # - https://paramdeo.com/blog/opting-your-website-out-of-googles-floc-network
  100. # - https://amifloced.org/
  101. #
  102. # Of course, a better solution is to just stop using browsers (like Chrome), which participate in such tracking practices.
  103. # See: `hydrogen_content_permission_policy`
  104. hydrogen_floc_optout_enabled: true
  105. # Controls if HSTS preloading is enabled
  106. #
  107. # In its strongest and recommended form, the [HSTS policy](https://www.chromium.org/hsts) includes all subdomains, and
  108. # indicates a willingness to be "preloaded" into browsers:
  109. # `Strict-Transport-Security: max-age=31536000; includeSubDomains; preload`
  110. # For more information visit:
  111. # - https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security
  112. # - https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security
  113. # - https://hstspreload.org/#opt-in
  114. # See: `hydrogen_http_header_strict_transport_security`
  115. hydrogen_hsts_preload_enabled: false
  116. hydrogen_scheme: https
  117. # The path at which Hydrogen is exposed.
  118. # This value must either be `/` or not end with a slash (e.g. `/hydrogen`).
  119. hydrogen_path_prefix: /
  120. # Controls whether the self-check feature should validate SSL certificates.
  121. hydrogen_self_check_validate_certificates: true
  122. # Controls whether the access log is enabled.
  123. hydrogen_access_log_enabled: true
  124. # config.json
  125. hydrogen_push:
  126. appId: io.element.hydrogen.web
  127. gatewayUrl: https://matrix.org
  128. applicationServerKey: "BC-gpSdVHEXhvHSHS0AzzWrQoukv2BE7KzpoPO_FfPacqOo3l1pdqz7rSgmB04pZCWaHPz7XRe6fjLaC-WPDopM"
  129. hydrogen_default_hs_url: ""
  130. hydrogen_bugReportEndpointUrl: "https://element.io/bugreports/submit" # noqa var-naming
  131. # Default Hydrogen configuration template which covers the generic use case.
  132. # You can customize it by controlling the various variables inside it.
  133. #
  134. # For a more advanced customization, you can extend the default (see `hydrogen_configuration_extension_json`)
  135. # or completely replace this variable with your own template.
  136. #
  137. # The side-effect of this lookup is that Ansible would even parse the JSON for us, returning a dict.
  138. # This is unlike what it does when looking up YAML template files (no automatic parsing there).
  139. hydrogen_configuration_default: "{{ lookup('template', 'templates/config.json.j2', convert_data=False) | from_json }}"
  140. # Your custom JSON configuration for Hydrogen should go to `hydrogen_configuration_extension_json`.
  141. # This configuration extends the default starting configuration (`hydrogen_configuration_default`).
  142. #
  143. # You can override individual variables from the default configuration, or introduce new ones.
  144. #
  145. # If you need something more special, you can take full control by
  146. # completely redefining `hydrogen_configuration_default`.
  147. #
  148. # Example configuration extension follows:
  149. #
  150. # hydrogen_configuration_extension_json: |
  151. # {
  152. # "push": {
  153. # "appId": "io.element.hydrogen.web",
  154. # "gatewayUrl": "https://matrix.org",
  155. # "applicationServerKey": "BC-gpSdVHEXhvHSHS0AzzWrQoukv2BE7KzpoPO_FfPacqOo3l1pdqz7rSgmB04pZCWaHPz7XRe6fjLaC-WPDopM"
  156. # },
  157. # "defaultHomeServer": "matrix.org"
  158. # }
  159. hydrogen_configuration_extension_json: '{}'
  160. hydrogen_configuration_extension: "{{ hydrogen_configuration_extension_json | from_json if hydrogen_configuration_extension_json | from_json is mapping else {} }}"
  161. # Holds the final Hydrogen configuration (a combination of the default and its extension).
  162. # You most likely don't need to touch this variable. Instead, see `hydrogen_configuration_default`.
  163. hydrogen_configuration: "{{ hydrogen_configuration_default | combine(hydrogen_configuration_extension, recursive=True) }}"