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

185 строки
11 KiB

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