Matrix Docker Ansible eploy
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 

179 righe
11 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. matrix_matrixto_container_image: "{{ matrix_matrixto_container_image_registry_prefix }}shirahara/matrixto:{{ matrix_matrixto_container_image_tag }}"
  24. matrix_matrixto_container_image_tag: "{{ matrix_matrixto_version }}"
  25. matrix_matrixto_container_image_registry_prefix: "{{ matrix_matrixto_container_image_registry_prefix_upstream }}"
  26. matrix_matrixto_container_image_registry_prefix_upstream: "{{ matrix_matrixto_container_image_registry_prefix_upstream_default }}"
  27. matrix_matrixto_container_image_registry_prefix_upstream_default: ""
  28. matrix_matrixto_container_image_force_pull: "{{ matrix_matrixto_container_image.endswith(':latest') }}"
  29. matrix_matrixto_container_image_self_build: true
  30. matrix_matrixto_container_image_self_build_name: "shirahara/matrixto:{{ matrix_matrixto_container_image_self_build_repo_version }}"
  31. matrix_matrixto_container_image_self_build_repo: "https://seed.radicle.garden/z3Re1EQbd186vUQDwHByYiLadsVWY.git"
  32. matrix_matrixto_container_image_self_build_repo_version: "{{ matrix_matrixto_version if matrix_matrixto_version != 'latest' else 'main' }}"
  33. matrix_matrixto_container_image_self_build_src_files_path: "{{ matrix_matrixto_base_path }}/docker-src"
  34. # Controls whether the container exposes its HTTP port (tcp/8080 in the container).
  35. #
  36. # Takes an "<ip>:<port>" or "<port>" value (e.g. "127.0.0.1:2586"), or empty string to not expose.
  37. matrix_matrixto_container_http_host_bind_port: ""
  38. # The base container network. It will be auto-created by this role if it doesn't exist already.
  39. matrix_matrixto_container_network: "{{ matrix_matrixto_identifier }}"
  40. # The port number in the container
  41. matrix_matrixto_container_http_port: 5000
  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_matrixto_container_additional_networks: "{{ matrix_matrixto_container_additional_networks_auto + matrix_matrixto_container_additional_networks_custom }}"
  46. matrix_matrixto_container_additional_networks_auto: []
  47. matrix_matrixto_container_additional_networks_custom: []
  48. # A list of additional "volumes" to mount in the container.
  49. # This list gets populated dynamically at runtime. You can provide a different default value,
  50. # if you wish to mount your own files into the container.
  51. # Contains definition objects like this: `{"type": "bind", "src": "/outside", "dst": "/inside", "options": "readonly"}.
  52. # See the `--mount` documentation for the `docker run` command.
  53. matrix_matrixto_container_additional_volumes: "{{ matrix_matrixto_container_additional_volumes_auto + matrix_matrixto_container_additional_volumes_custom }}"
  54. matrix_matrixto_container_additional_volumes_auto: []
  55. matrix_matrixto_container_additional_volumes_custom: []
  56. # matrix_matrixto_container_labels_traefik_enabled controls whether labels to assist a Traefik reverse-proxy will be attached to the container.
  57. # See `../templates/labels.j2` for details.
  58. #
  59. # To inject your own other container labels, see `matrix_matrixto_container_labels_additional_labels`.
  60. matrix_matrixto_container_labels_traefik_enabled: true
  61. matrix_matrixto_container_labels_traefik_docker_network: "{{ matrix_matrixto_container_network }}"
  62. matrix_matrixto_container_labels_traefik_hostname: "{{ matrix_matrixto_hostname }}"
  63. # The path prefix must either be `/` or not end with a slash (e.g. `/matrixto`).
  64. matrix_matrixto_container_labels_traefik_path_prefix: "{{ matrix_matrixto_path_prefix }}"
  65. 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 %}"
  66. matrix_matrixto_container_labels_traefik_priority: 0
  67. matrix_matrixto_container_labels_traefik_entrypoints: web-secure
  68. matrix_matrixto_container_labels_traefik_tls: "{{ matrix_matrixto_container_labels_traefik_entrypoints != 'web' }}"
  69. matrix_matrixto_container_labels_traefik_tls_certResolver: default # noqa var-naming
  70. # Controls which additional headers to attach to all HTTP requests.
  71. # To add your own custom request headers, use `matrix_matrixto_container_labels_traefik_additional_request_headers_custom`
  72. 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) }}"
  73. matrix_matrixto_container_labels_traefik_additional_request_headers_auto: {}
  74. matrix_matrixto_container_labels_traefik_additional_request_headers_custom: {}
  75. # Controls which additional headers to attach to all HTTP responses.
  76. # To add your own custom response headers, use `matrix_matrixto_container_labels_traefik_additional_response_headers_custom`
  77. 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) }}"
  78. matrix_matrixto_container_labels_traefik_additional_response_headers_auto: |
  79. {{
  80. {}
  81. | combine ({'X-XSS-Protection': matrix_matrixto_http_header_xss_protection} if matrix_matrixto_http_header_xss_protection else {})
  82. | combine ({'X-Content-Type-Options': matrix_matrixto_http_header_content_type_options} if matrix_matrixto_http_header_content_type_options else {})
  83. | combine ({'Content-Security-Policy': matrix_matrixto_http_header_content_security_policy} if matrix_matrixto_http_header_content_security_policy else {})
  84. | combine ({'Permissions-Policy': matrix_matrixto_http_header_permissions_policy} if matrix_matrixto_http_header_permissions_policy else {})
  85. | 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 {})
  86. }}
  87. matrix_matrixto_container_labels_traefik_additional_response_headers_custom: {}
  88. # matrix_matrixto_container_labels_additional_labels contains a multiline string with additional labels to add to the container label file.
  89. # See `../templates/labels.j2` for details.
  90. #
  91. # Example:
  92. # matrix_matrixto_container_labels_additional_labels: |
  93. # my.label=1
  94. # another.label="here"
  95. matrix_matrixto_container_labels_additional_labels: ""
  96. # A list of extra arguments to pass to the container (`docker run` command)
  97. matrix_matrixto_container_extra_arguments: []
  98. # Specifies the value of the `X-XSS-Protection` header
  99. # Stops pages from loading when they detect reflected cross-site scripting (XSS) attacks.
  100. #
  101. # Learn more about it is here:
  102. # - https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-XSS-Protection
  103. # - https://portswigger.net/web-security/cross-site-scripting/reflected
  104. matrix_matrixto_http_header_xss_protection: "1; mode=block"
  105. # Specifies the value of the `X-Content-Type-Options` header.
  106. # See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Content-Type-Options
  107. matrix_matrixto_http_header_content_type_options: nosniff
  108. # Specifies the value of the `Content-Security-Policy` header.
  109. # See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy
  110. matrix_matrixto_http_header_content_security_policy: frame-ancestors 'self'
  111. # Specifies the value of the `Permissions-Policy` header.
  112. # See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Permissions-Policy
  113. matrix_matrixto_http_header_permissions_policy: "{{ 'interest-cohort=()' if matrix_matrixto_floc_optout_enabled else '' }}"
  114. # Specifies the value of the `Strict-Transport-Security` header.
  115. # See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security
  116. matrix_matrixto_http_header_strict_transport_security: "max-age=31536000; includeSubDomains{{ '; preload' if matrix_matrixto_hsts_preload_enabled else '' }}"
  117. # Controls whether to send a "Permissions-Policy interest-cohort=();" header along with all responses
  118. #
  119. # Learn more about what it is here:
  120. # - https://www.eff.org/deeplinks/2021/03/googles-floc-terrible-idea
  121. # - https://paramdeo.com/blog/opting-your-website-out-of-googles-floc-network
  122. # - https://amifloced.org/
  123. #
  124. # Of course, a better solution is to just stop using browsers (like Chrome), which participate in such tracking practices.
  125. # See: `matrix_matrixto_http_header_permissions_policy`
  126. matrix_matrixto_floc_optout_enabled: true
  127. # Controls if HSTS preloading is enabled
  128. #
  129. # In its strongest and recommended form, the [HSTS policy](https://www.chromium.org/hsts) includes all subdomains, and
  130. # indicates a willingness to be "preloaded" into browsers:
  131. # `Strict-Transport-Security: max-age=31536000; includeSubDomains; preload`
  132. # For more information visit:
  133. # - https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security
  134. # - https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security
  135. # - https://hstspreload.org/#opt-in
  136. # See: `matrix_matrixto_http_header_strict_transport_security`
  137. matrix_matrixto_hsts_preload_enabled: false
  138. # List of systemd services that the Matrix.to systemd service depends on
  139. 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 }}"
  140. matrix_matrixto_systemd_required_services_list_default: "{{ [devture_systemd_docker_base_docker_service_name] if devture_systemd_docker_base_docker_service_name else [] }}"
  141. matrix_matrixto_systemd_required_services_list_auto: []
  142. matrix_matrixto_systemd_required_services_list_custom: []
  143. # List of systemd services that the Matrix.to systemd service wants
  144. 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 }}"
  145. matrix_matrixto_systemd_wanted_services_list_default: []
  146. matrix_matrixto_systemd_wanted_services_list_auto: []
  147. matrix_matrixto_systemd_wanted_services_list_custom: []
  148. # Additional environment variables.
  149. matrix_matrixto_environment_variables_additional_variables: ""