Matrix Docker Ansible eploy
Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 

173 linhas
10 KiB

  1. # SPDX-FileCopyrightText: 2023 - 2024 Nikita Chernyi
  2. # SPDX-FileCopyrightText: 2023 - 2025 Slavi Pantaleev
  3. # SPDX-FileCopyrightText: 2024 Sergio Durigan Junior
  4. # SPDX-FileCopyrightText: 2025 MASH project contributors
  5. # SPDX-FileCopyrightText: 2025 Suguru Hirahara
  6. #
  7. # SPDX-License-Identifier: AGPL-3.0-or-later
  8. ---
  9. # Project source code URL: https://app.radicle.xyz/nodes/seed.radicle.garden/rad%3Az3Re1EQbd186vUQDwHByYiLadsVWY
  10. matrix_matrixto_enabled: true
  11. matrix_matrixto_identifier: matrix-matrixto
  12. matrix_matrixto_base_path: "/{{ matrix_matrixto_identifier }}"
  13. matrix_matrixto_version: 1.2.17-1
  14. matrix_matrixto_scheme: https
  15. # The hostname at which Matrix.to is served.
  16. matrix_matrixto_hostname: ""
  17. # The path at which Matrix.to is exposed.
  18. # This value must either be `/` or not end with a slash (e.g. `/matrixto`).
  19. #
  20. # Hosting Matrix.to under a subpath does not seem to be possible due to Matrix.to's
  21. # technical limitations.
  22. matrix_matrixto_path_prefix: /
  23. # There does not exist a known pre-built container image. It needs to be built locally.
  24. matrix_matrixto_container_image_self_build: true
  25. matrix_matrixto_container_image_self_build_name: "shirahara/matrixto:{{ matrix_matrixto_container_image_self_build_repo_version }}"
  26. matrix_matrixto_container_image_self_build_repo: "https://seed.radicle.garden/z3Re1EQbd186vUQDwHByYiLadsVWY.git"
  27. matrix_matrixto_container_image_self_build_repo_version: "{{ matrix_matrixto_version if matrix_matrixto_version != 'latest' else 'main' }}"
  28. matrix_matrixto_container_image_self_build_src_files_path: "{{ matrix_matrixto_base_path }}/docker-src"
  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:2586"), or empty string to not expose.
  32. matrix_matrixto_container_http_host_bind_port: ""
  33. # The base container network. It will be auto-created by this role if it doesn't exist already.
  34. matrix_matrixto_container_network: "{{ matrix_matrixto_identifier }}"
  35. # The port number in the container
  36. matrix_matrixto_container_http_port: 5000
  37. # A list of additional container networks that the container would be connected to.
  38. # The role does not create these networks, so make sure they already exist.
  39. # Use this to expose this container to another reverse proxy, which runs in a different container network.
  40. matrix_matrixto_container_additional_networks: "{{ matrix_matrixto_container_additional_networks_auto + matrix_matrixto_container_additional_networks_custom }}"
  41. matrix_matrixto_container_additional_networks_auto: []
  42. matrix_matrixto_container_additional_networks_custom: []
  43. # A list of additional "volumes" to mount in the container.
  44. # This list gets populated dynamically at runtime. You can provide a different default value,
  45. # if you wish to mount your own files into the container.
  46. # Contains definition objects like this: `{"type": "bind", "src": "/outside", "dst": "/inside", "options": "readonly"}.
  47. # See the `--mount` documentation for the `docker run` command.
  48. matrix_matrixto_container_additional_volumes: "{{ matrix_matrixto_container_additional_volumes_auto + matrix_matrixto_container_additional_volumes_custom }}"
  49. matrix_matrixto_container_additional_volumes_auto: []
  50. matrix_matrixto_container_additional_volumes_custom: []
  51. # matrix_matrixto_container_labels_traefik_enabled controls whether labels to assist a Traefik reverse-proxy will be attached to the container.
  52. # See `../templates/labels.j2` for details.
  53. #
  54. # To inject your own other container labels, see `matrix_matrixto_container_labels_additional_labels`.
  55. matrix_matrixto_container_labels_traefik_enabled: true
  56. matrix_matrixto_container_labels_traefik_docker_network: "{{ matrix_matrixto_container_network }}"
  57. matrix_matrixto_container_labels_traefik_hostname: "{{ matrix_matrixto_hostname }}"
  58. # The path prefix must either be `/` or not end with a slash (e.g. `/matrixto`).
  59. matrix_matrixto_container_labels_traefik_path_prefix: "{{ matrix_matrixto_path_prefix }}"
  60. matrix_matrixto_container_labels_traefik_rule: "Host(`{{ matrix_matrixto_container_labels_traefik_hostname }}`){% if matrix_matrixto_container_labels_traefik_path_prefix != '/' %} && PathPrefix(`{{ matrix_matrixto_container_labels_traefik_path_prefix }}`){% endif %}"
  61. matrix_matrixto_container_labels_traefik_priority: 0
  62. matrix_matrixto_container_labels_traefik_entrypoints: web-secure
  63. matrix_matrixto_container_labels_traefik_tls: "{{ matrix_matrixto_container_labels_traefik_entrypoints != 'web' }}"
  64. matrix_matrixto_container_labels_traefik_tls_certResolver: default # noqa var-naming
  65. # Controls which additional headers to attach to all HTTP requests.
  66. # To add your own custom request headers, use `matrix_matrixto_container_labels_traefik_additional_request_headers_custom`
  67. matrix_matrixto_container_labels_traefik_additional_request_headers: "{{ matrix_matrixto_container_labels_traefik_additional_request_headers_auto | combine(matrix_matrixto_container_labels_traefik_additional_request_headers_custom) }}"
  68. matrix_matrixto_container_labels_traefik_additional_request_headers_auto: {}
  69. matrix_matrixto_container_labels_traefik_additional_request_headers_custom: {}
  70. # Controls which additional headers to attach to all HTTP responses.
  71. # To add your own custom response headers, use `matrix_matrixto_container_labels_traefik_additional_response_headers_custom`
  72. matrix_matrixto_container_labels_traefik_additional_response_headers: "{{ matrix_matrixto_container_labels_traefik_additional_response_headers_auto | combine(matrix_matrixto_container_labels_traefik_additional_response_headers_custom) }}"
  73. matrix_matrixto_container_labels_traefik_additional_response_headers_auto: |
  74. {{
  75. {}
  76. | combine ({'X-XSS-Protection': matrix_matrixto_http_header_xss_protection} if matrix_matrixto_http_header_xss_protection else {})
  77. | combine ({'X-Content-Type-Options': matrix_matrixto_http_header_content_type_options} if matrix_matrixto_http_header_content_type_options else {})
  78. | combine ({'Content-Security-Policy': matrix_matrixto_http_header_content_security_policy} if matrix_matrixto_http_header_content_security_policy else {})
  79. | combine ({'Permissions-Policy': matrix_matrixto_http_header_permissions_policy} if matrix_matrixto_http_header_permissions_policy else {})
  80. | combine ({'Strict-Transport-Security': matrix_matrixto_http_header_strict_transport_security} if matrix_matrixto_http_header_strict_transport_security and matrix_matrixto_container_labels_traefik_tls else {})
  81. }}
  82. matrix_matrixto_container_labels_traefik_additional_response_headers_custom: {}
  83. # matrix_matrixto_container_labels_additional_labels contains a multiline string with additional labels to add to the container label file.
  84. # See `../templates/labels.j2` for details.
  85. #
  86. # Example:
  87. # matrix_matrixto_container_labels_additional_labels: |
  88. # my.label=1
  89. # another.label="here"
  90. matrix_matrixto_container_labels_additional_labels: "com.centurylinklabs.watchtower.enable=false"
  91. # A list of extra arguments to pass to the container (`docker run` command)
  92. matrix_matrixto_container_extra_arguments: []
  93. # Specifies the value of the `X-XSS-Protection` header
  94. # Stops pages from loading when they detect reflected cross-site scripting (XSS) attacks.
  95. #
  96. # Learn more about it is here:
  97. # - https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-XSS-Protection
  98. # - https://portswigger.net/web-security/cross-site-scripting/reflected
  99. matrix_matrixto_http_header_xss_protection: "1; mode=block"
  100. # Specifies the value of the `X-Content-Type-Options` header.
  101. # See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Content-Type-Options
  102. matrix_matrixto_http_header_content_type_options: nosniff
  103. # Specifies the value of the `Content-Security-Policy` header.
  104. # See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy
  105. matrix_matrixto_http_header_content_security_policy: frame-ancestors 'self'
  106. # Specifies the value of the `Permissions-Policy` header.
  107. # See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Permissions-Policy
  108. matrix_matrixto_http_header_permissions_policy: "{{ 'interest-cohort=()' if matrix_matrixto_floc_optout_enabled else '' }}"
  109. # Specifies the value of the `Strict-Transport-Security` header.
  110. # See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security
  111. matrix_matrixto_http_header_strict_transport_security: "max-age=31536000; includeSubDomains{{ '; preload' if matrix_matrixto_hsts_preload_enabled else '' }}"
  112. # Controls whether to send a "Permissions-Policy interest-cohort=();" header along with all responses
  113. #
  114. # Learn more about what it is here:
  115. # - https://www.eff.org/deeplinks/2021/03/googles-floc-terrible-idea
  116. # - https://paramdeo.com/blog/opting-your-website-out-of-googles-floc-network
  117. # - https://amifloced.org/
  118. #
  119. # Of course, a better solution is to just stop using browsers (like Chrome), which participate in such tracking practices.
  120. # See: `matrix_matrixto_http_header_permissions_policy`
  121. matrix_matrixto_floc_optout_enabled: true
  122. # Controls if HSTS preloading is enabled
  123. #
  124. # In its strongest and recommended form, the [HSTS policy](https://www.chromium.org/hsts) includes all subdomains, and
  125. # indicates a willingness to be "preloaded" into browsers:
  126. # `Strict-Transport-Security: max-age=31536000; includeSubDomains; preload`
  127. # For more information visit:
  128. # - https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security
  129. # - https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security
  130. # - https://hstspreload.org/#opt-in
  131. # See: `matrix_matrixto_http_header_strict_transport_security`
  132. matrix_matrixto_hsts_preload_enabled: false
  133. # List of systemd services that the Matrix.to systemd service depends on
  134. matrix_matrixto_systemd_required_services_list: "{{ matrix_matrixto_systemd_required_services_list_default + matrix_matrixto_systemd_required_services_list_auto + matrix_matrixto_systemd_required_services_list_custom }}"
  135. matrix_matrixto_systemd_required_services_list_default: "{{ [devture_systemd_docker_base_docker_service_name] if devture_systemd_docker_base_docker_service_name else [] }}"
  136. matrix_matrixto_systemd_required_services_list_auto: []
  137. matrix_matrixto_systemd_required_services_list_custom: []
  138. # List of systemd services that the Matrix.to systemd service wants
  139. matrix_matrixto_systemd_wanted_services_list: "{{ matrix_matrixto_systemd_wanted_services_list_default + matrix_matrixto_systemd_wanted_services_list_auto + matrix_matrixto_systemd_wanted_services_list_custom }}"
  140. matrix_matrixto_systemd_wanted_services_list_default: []
  141. matrix_matrixto_systemd_wanted_services_list_auto: []
  142. matrix_matrixto_systemd_wanted_services_list_custom: []
  143. # Additional environment variables.
  144. matrix_matrixto_environment_variables_additional_variables: ""