Matrix Docker Ansible eploy
Você não pode selecionar mais de 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.
 
 

208 linhas
11 KiB

  1. # SPDX-FileCopyrightText: 2022 - 2024 Nikita Chernyi
  2. # SPDX-FileCopyrightText: 2022 - 2024 Slavi Pantaleev
  3. # SPDX-FileCopyrightText: 2022 László Várady
  4. # SPDX-FileCopyrightText: 2022 MDAD project contributors
  5. # SPDX-FileCopyrightText: 2022 Marko Weltzer
  6. # SPDX-FileCopyrightText: 2023 Samuel Meenzen
  7. # SPDX-FileCopyrightText: 2024 Suguru Hirahara
  8. #
  9. # SPDX-License-Identifier: AGPL-3.0-or-later
  10. ---
  11. # Project source code URL: https://github.com/ajbura/cinny
  12. cinny_enabled: true
  13. cinny_container_image_self_build: false
  14. cinny_container_image_self_build_repo: "https://github.com/ajbura/cinny.git"
  15. # renovate: datasource=docker depName=ajbura/cinny
  16. cinny_version: v4.10.2
  17. cinny_container_image: "{{ cinny_container_image_registry_prefix }}ajbura/cinny:{{ cinny_version }}"
  18. cinny_container_image_registry_prefix_upstream_default: docker.io/
  19. cinny_container_image_force_pull: "{{ cinny_container_image.endswith(':latest') }}"
  20. cinny_base_path: "{{ matrix_base_data_path }}/client-cinny"
  21. cinny_docker_src_files_path: "{{ cinny_base_path }}/docker-src"
  22. # The base container network
  23. cinny_container_network: ''
  24. # A list of additional container networks that the container would be connected to.
  25. # The role does not create these networks, so make sure they already exist.
  26. # Use this to expose this container to a reverse proxy, which runs in a different container network.
  27. cinny_container_additional_networks: []
  28. # Controls whether the container exposes its HTTP port (tcp/8080 in the container).
  29. #
  30. # Takes an "<ip>:<port>" or "<port>" value (e.g. "127.0.0.1:8768"), or empty string to not expose.
  31. cinny_container_http_host_bind_port: ''
  32. # cinny_container_labels_traefik_enabled controls whether labels to assist a Traefik reverse-proxy will be attached to the container.
  33. # See `../templates/labels.j2` for details.
  34. #
  35. # To inject your own other container labels, see `cinny_container_labels_additional_labels`.
  36. cinny_container_labels_traefik_enabled: true
  37. cinny_container_labels_traefik_docker_network: "{{ cinny_container_network }}"
  38. cinny_container_labels_traefik_hostname: "{{ cinny_hostname }}"
  39. # The path prefix must either be `/` or not end with a slash (e.g. `/cinny`).
  40. cinny_container_labels_traefik_path_prefix: "{{ cinny_path_prefix }}"
  41. cinny_container_labels_traefik_rule: "Host(`{{ cinny_container_labels_traefik_hostname }}`){% if cinny_container_labels_traefik_path_prefix != '/' %} && PathPrefix(`{{ cinny_container_labels_traefik_path_prefix }}`){% endif %}"
  42. cinny_container_labels_traefik_priority: 0
  43. cinny_container_labels_traefik_entrypoints: web-secure
  44. cinny_container_labels_traefik_tls: "{{ cinny_container_labels_traefik_entrypoints != 'web' }}"
  45. cinny_container_labels_traefik_tls_certResolver: default # noqa var-naming
  46. # Controls whether a compression middleware will be injected into the middlewares list.
  47. # This compression middleware is supposed to be defined elsewhere (using labels or a File provider, etc.) and is merely referenced by this router.
  48. cinny_container_labels_traefik_compression_middleware_enabled: false
  49. cinny_container_labels_traefik_compression_middleware_name: ""
  50. # Controls which additional headers to attach to all HTTP responses.
  51. # To add your own headers, use `cinny_container_labels_traefik_additional_response_headers_custom`
  52. cinny_container_labels_traefik_additional_response_headers: "{{ cinny_container_labels_traefik_additional_response_headers_auto | combine(cinny_container_labels_traefik_additional_response_headers_custom) }}"
  53. cinny_container_labels_traefik_additional_response_headers_auto: |
  54. {{
  55. {}
  56. | combine ({'X-XSS-Protection': cinny_http_header_xss_protection} if cinny_http_header_xss_protection else {})
  57. | combine ({'X-Frame-Options': cinny_http_header_frame_options} if cinny_http_header_frame_options else {})
  58. | combine ({'X-Content-Type-Options': cinny_http_header_content_type_options} if cinny_http_header_content_type_options else {})
  59. | combine ({'Content-Security-Policy': cinny_http_header_content_security_policy} if cinny_http_header_content_security_policy else {})
  60. | combine ({'Permission-Policy': cinny_http_header_content_permission_policy} if cinny_http_header_content_permission_policy else {})
  61. | combine ({'Strict-Transport-Security': cinny_http_header_strict_transport_security} if cinny_http_header_strict_transport_security and cinny_container_labels_traefik_tls else {})
  62. }}
  63. cinny_container_labels_traefik_additional_response_headers_custom: {}
  64. # cinny_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. # cinny_container_labels_additional_labels: |
  69. # my.label=1
  70. # another.label="here"
  71. cinny_container_labels_additional_labels: ''
  72. # A list of extra arguments to pass to the container
  73. cinny_container_extra_arguments: []
  74. # List of systemd services that cinny.service depends on
  75. cinny_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. cinny_http_header_xss_protection: "1; mode=block"
  83. # Specifies the value of the `X-Frame-Options` header which controls whether framing can happen.
  84. # See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options
  85. cinny_http_header_frame_options: SAMEORIGIN
  86. # Specifies the value of the `X-Content-Type-Options` header.
  87. # See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Content-Type-Options
  88. cinny_http_header_content_type_options: nosniff
  89. # Specifies the value of the `Content-Security-Policy` header.
  90. # See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy
  91. cinny_http_header_content_security_policy: frame-ancestors 'self'
  92. # Specifies the value of the `Permission-Policy` header.
  93. # See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Permission-Policy
  94. cinny_http_header_content_permission_policy: "{{ 'interest-cohort=()' if cinny_floc_optout_enabled else '' }}"
  95. # Specifies the value of the `Strict-Transport-Security` header.
  96. # See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security
  97. cinny_http_header_strict_transport_security: "max-age=31536000; includeSubDomains{{ '; preload' if cinny_hsts_preload_enabled else '' }}"
  98. # Controls whether to send a "Permissions-Policy interest-cohort=();" header along with all responses
  99. #
  100. # Learn more about what it is here:
  101. # - https://www.eff.org/deeplinks/2021/03/googles-floc-terrible-idea
  102. # - https://paramdeo.com/blog/opting-your-website-out-of-googles-floc-network
  103. # - https://amifloced.org/
  104. #
  105. # Of course, a better solution is to just stop using browsers (like Chrome), which participate in such tracking practices.
  106. # See: `cinny_content_permission_policy`
  107. cinny_floc_optout_enabled: true
  108. # Controls if HSTS preloading is enabled
  109. #
  110. # In its strongest and recommended form, the [HSTS policy](https://www.chromium.org/hsts) includes all subdomains, and
  111. # indicates a willingness to be "preloaded" into browsers:
  112. # `Strict-Transport-Security: max-age=31536000; includeSubDomains; preload`
  113. # For more information visit:
  114. # - https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security
  115. # - https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security
  116. # - https://hstspreload.org/#opt-in
  117. # See: `cinny_http_header_strict_transport_security`
  118. cinny_hsts_preload_enabled: false
  119. cinny_scheme: https
  120. # The hostname at which Cinny is served.
  121. # Only works with with Traefik reverse-proxying.
  122. cinny_hostname: "{{ matrix_server_fqn_cinny }}"
  123. # The path at which Cinny is exposed.
  124. # This value must either be `/` or not end with a slash (e.g. `/cinny`).
  125. cinny_path_prefix: /
  126. # Controls whether the self-check feature should validate SSL certificates.
  127. cinny_self_check_validate_certificates: true
  128. # Default homeserver URL to use in the `config.json` file.
  129. # See `cinny_config_homeserverList`.
  130. cinny_default_hs_url: ""
  131. # Controls whether the Cinny access log is enabled
  132. cinny_access_log_enabled: true
  133. # Controls the `defaultHomeserver` value in the `config.json` file.
  134. cinny_config_defaultHomeserver: 0 # noqa var-naming
  135. # Controls the `homeserverList` value in the `config.json` file.
  136. cinny_config_homeserverList: "{{ [cinny_default_hs_url] }}" # noqa var-naming
  137. # Controls the `allowCustomHomeservers` value in the `config.json` file.
  138. cinny_config_allowCustomHomeservers: true # noqa var-naming
  139. # Controls the `featuredCommunities.spaces` value in the `config.json` file.
  140. cinny_config_featuredCommunities_spaces: [] # noqa var-naming
  141. # Controls the `featuredCommunities.rooms` value in the `config.json` file.
  142. cinny_config_featuredCommunities_rooms: [] # noqa var-naming
  143. # Controls the `featuredCommunities.servers` value in the `config.json` file.
  144. cinny_config_featuredCommunities_servers: ["matrix.org"] # noqa var-naming
  145. # Controls the `featuredCommunities.openAsDefault` value in the `config.json` file.
  146. cinny_config_featuredCommunities_openAsDefault: false # noqa var-naming
  147. # Default Cinny configuration template which covers the generic use case.
  148. # You can customize it by controlling the various variables inside it.
  149. #
  150. # For a more advanced customization, you can extend the default (see `cinny_configuration_extension_json`)
  151. # or completely replace this variable with your own template.
  152. #
  153. # The side-effect of this lookup is that Ansible would even parse the JSON for us, returning a dict.
  154. # This is unlike what it does when looking up YAML template files (no automatic parsing there).
  155. cinny_configuration_default: "{{ lookup('template', 'templates/config.json.j2', convert_data=False) | from_json }}"
  156. # Your custom JSON configuration for Cinny should go to `cinny_configuration_extension_json`.
  157. # This configuration extends the default starting configuration (`cinny_configuration_default`).
  158. #
  159. # You can override individual variables from the default configuration, or introduce new ones.
  160. #
  161. # If you need something more special, you can take full control by
  162. # completely redefining `cinny_configuration_default`.
  163. cinny_configuration_extension_json: '{}'
  164. cinny_configuration_extension: "{{ cinny_configuration_extension_json | from_json if cinny_configuration_extension_json | from_json is mapping else {} }}"
  165. # Holds the final Cinny configuration (a combination of the default and its extension).
  166. # You most likely don't need to touch this variable. Instead, see `cinny_configuration_default`.
  167. cinny_configuration: "{{ cinny_configuration_default | combine(cinny_configuration_extension, recursive=True) }}"