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.
 
 

222 linhas
12 KiB

  1. ---
  2. # Project source code URL: https://github.com/turt2live/matrix-dimension
  3. matrix_dimension_enabled: false
  4. matrix_dimension_scheme: https
  5. # The hostname at which Dimension is served.
  6. matrix_dimension_hostname: ''
  7. # The path at which Dimension is exposed.
  8. # This value must either be `/` or not end with a slash (e.g. `/dimension`).
  9. matrix_dimension_path_prefix: /
  10. # You are required to specify an access token for Dimension to work.
  11. # For information on how to acquire an access token, visit https://t2bot.io/docs/access_tokens
  12. matrix_dimension_access_token: ""
  13. # Users in form: ['@alice:example.com', '@bob:example.com']
  14. matrix_dimension_admins: []
  15. # Whether to allow Dimension widgets serve websites with invalid or self signed SSL certificates
  16. matrix_dimension_widgets_allow_self_signed_ssl_certificates: false
  17. matrix_dimension_container_image_self_build: false
  18. matrix_dimension_container_image_self_build_repo: "https://github.com/turt2live/matrix-dimension.git"
  19. matrix_dimension_container_image_self_build_branch: master
  20. matrix_dimension_base_path: "{{ matrix_base_data_path }}/dimension"
  21. matrix_dimension_docker_src_files_path: "{{ matrix_base_data_path }}/docker-src/dimension"
  22. # renovate: datasource=docker depName=turt2live/matrix-dimension
  23. matrix_dimension_version: latest
  24. matrix_dimension_docker_image: "{{ matrix_dimension_docker_image_name_prefix }}turt2live/matrix-dimension:{{ matrix_dimension_version }}"
  25. matrix_dimension_docker_image_name_prefix: "{{ 'localhost/' if matrix_dimension_container_image_self_build else matrix_container_global_registry_prefix }}"
  26. matrix_dimension_docker_image_force_pull: "{{ matrix_dimension_docker_image.endswith(':latest') }}"
  27. # List of systemd services that matrix-dimension.service depends on.
  28. matrix_dimension_systemd_required_services_list: "{{ matrix_dimension_systemd_required_services_list_default + matrix_dimension_systemd_required_services_list_auto + matrix_dimension_systemd_required_services_list_custom }}"
  29. matrix_dimension_systemd_required_services_list_default: "{{ [devture_systemd_docker_base_docker_service_name] if devture_systemd_docker_base_docker_service_name else [] }}"
  30. matrix_dimension_systemd_required_services_list_auto: []
  31. matrix_dimension_systemd_required_services_list_custom: []
  32. # List of systemd services that matrix-dimension.service wants
  33. matrix_dimension_systemd_wanted_services_list: []
  34. # The user and group ID correspond to the node user in the `turt2live/matrix-dimension` image.
  35. matrix_dimension_user_uid: '1000'
  36. matrix_dimension_user_gid: '1000'
  37. # The base container network. It will be auto-created by this role if it doesn't exist already.
  38. matrix_dimension_container_network: matrix-dimension
  39. # A list of additional container networks that the container would be connected to.
  40. # The role does not create these networks, so make sure they already exist.
  41. # Use this to expose this container to another reverse proxy, which runs in a different container network.
  42. matrix_dimension_container_additional_networks: []
  43. # Controls whether the matrix-dimension container exposes its HTTP port (tcp/8184 in the container).
  44. #
  45. # Takes an "<ip>:<port>" or "<port>" value (e.g. "127.0.0.1:8184"), or empty string to not expose.
  46. matrix_dimension_container_http_host_bind_port: ''
  47. # matrix_dimension_container_labels_traefik_enabled controls whether labels to assist a Traefik reverse-proxy will be attached to the container.
  48. # See `../templates/labels.j2` for details.
  49. #
  50. # To inject your own other container labels, see `matrix_dimension_container_labels_additional_labels`.
  51. matrix_dimension_container_labels_traefik_enabled: true
  52. matrix_dimension_container_labels_traefik_docker_network: "{{ matrix_dimension_container_network }}"
  53. matrix_dimension_container_labels_traefik_hostname: "{{ matrix_dimension_hostname }}"
  54. # The path prefix must either be `/` or not end with a slash (e.g. `/dimension`).
  55. matrix_dimension_container_labels_traefik_path_prefix: "{{ matrix_dimension_path_prefix }}"
  56. matrix_dimension_container_labels_traefik_rule: "Host(`{{ matrix_dimension_container_labels_traefik_hostname }}`){% if matrix_dimension_container_labels_traefik_path_prefix != '/' %} && PathPrefix(`{{ matrix_dimension_container_labels_traefik_path_prefix }}`){% endif %}"
  57. matrix_dimension_container_labels_traefik_priority: 0
  58. matrix_dimension_container_labels_traefik_entrypoints: web-secure
  59. matrix_dimension_container_labels_traefik_tls: "{{ matrix_dimension_container_labels_traefik_entrypoints != 'web' }}"
  60. matrix_dimension_container_labels_traefik_tls_certResolver: default # noqa var-naming
  61. # Controls which additional headers to attach to all HTTP responses.
  62. # To add your own headers, use `matrix_dimension_container_labels_traefik_additional_response_headers_custom`
  63. matrix_dimension_container_labels_traefik_additional_response_headers: "{{ matrix_dimension_container_labels_traefik_additional_response_headers_auto | combine(matrix_dimension_container_labels_traefik_additional_response_headers_custom) }}"
  64. matrix_dimension_container_labels_traefik_additional_response_headers_auto: |
  65. {{
  66. {}
  67. | combine ({'X-XSS-Protection': matrix_dimension_http_header_xss_protection} if matrix_dimension_http_header_xss_protection else {})
  68. | combine ({'X-Frame-Options': matrix_dimension_http_header_frame_options} if matrix_dimension_http_header_frame_options else {})
  69. | combine ({'X-Content-Type-Options': matrix_dimension_http_header_content_type_options} if matrix_dimension_http_header_content_type_options else {})
  70. | combine ({'Content-Security-Policy': matrix_dimension_http_header_content_security_policy} if matrix_dimension_http_header_content_security_policy else {})
  71. | combine ({'Permission-Policy': matrix_dimension_http_header_content_permission_policy} if matrix_dimension_http_header_content_permission_policy else {})
  72. | combine ({'Strict-Transport-Security': matrix_dimension_http_header_strict_transport_security} if matrix_dimension_http_header_strict_transport_security and matrix_dimension_container_labels_traefik_tls else {})
  73. }}
  74. matrix_dimension_container_labels_traefik_additional_response_headers_custom: {}
  75. # matrix_dimension_container_labels_additional_labels contains a multiline string with additional labels to add to the container label file.
  76. # See `../templates/labels.j2` for details.
  77. #
  78. # Example:
  79. # matrix_dimension_container_labels_additional_labels: |
  80. # my.label=1
  81. # another.label="here"
  82. matrix_dimension_container_labels_additional_labels: ''
  83. # A list of extra arguments to pass to the container
  84. matrix_dimension_container_extra_arguments: []
  85. # Public facing base URL of the Dimension service.
  86. # It should not end with a slash.
  87. matrix_dimension_base_url: "{{ matrix_dimension_scheme }}://{{ matrix_dimension_hostname }}{{ '' if matrix_dimension_path_prefix == '/' else matrix_dimension_path_prefix }}"
  88. matrix_dimension_integrations_ui_url: "{{ matrix_dimension_base_url }}/element"
  89. matrix_dimension_integrations_rest_url: "{{ matrix_dimension_base_url }}/api/v1/scalar"
  90. matrix_dimension_integrations_widgets_urls: ["{{ matrix_dimension_base_url }}/widgets"]
  91. matrix_dimension_integrations_jitsi_widget_url: "{{ matrix_dimension_base_url }}/widgets/jitsi"
  92. matrix_dimension_homeserver_clientServerUrl: '' # noqa var-naming
  93. matrix_dimension_homeserver_federationUrl: '' # noqa var-naming
  94. matrix_dimension_homeserver_mediaUrl: '' # noqa var-naming
  95. # Controls the dimension.publicUrl configuration option
  96. matrix_dimension_dimension_publicUrl: "{{ matrix_dimension_base_url }}" # noqa var-naming
  97. # Specifies the value of the `X-XSS-Protection` header
  98. # Stops pages from loading when they detect reflected cross-site scripting (XSS) attacks.
  99. #
  100. # Learn more about it is here:
  101. # - https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-XSS-Protection
  102. # - https://portswigger.net/web-security/cross-site-scripting/reflected
  103. matrix_dimension_http_header_xss_protection: "1; mode=block"
  104. # Specifies the value of the `X-Frame-Options` header which controls whether framing can happen.
  105. # See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options
  106. matrix_dimension_http_header_frame_options: ''
  107. # Specifies the value of the `X-Content-Type-Options` header.
  108. # See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Content-Type-Options
  109. matrix_dimension_http_header_content_type_options: nosniff
  110. # Specifies the value of the `Content-Security-Policy` header.
  111. # See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy
  112. matrix_dimension_http_header_content_security_policy: ''
  113. # Specifies the value of the `Permission-Policy` header.
  114. # See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Permission-Policy
  115. matrix_dimension_http_header_content_permission_policy: "{{ 'interest-cohort=()' if matrix_dimension_floc_optout_enabled else '' }}"
  116. # Specifies the value of the `Strict-Transport-Security` header.
  117. # See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security
  118. matrix_dimension_http_header_strict_transport_security: "max-age=31536000; includeSubDomains{{ '; preload' if matrix_dimension_hsts_preload_enabled else '' }}"
  119. # Controls whether to send a "Permissions-Policy interest-cohort=();" header along with all responses
  120. #
  121. # Learn more about what it is here:
  122. # - https://www.eff.org/deeplinks/2021/03/googles-floc-terrible-idea
  123. # - https://paramdeo.com/blog/opting-your-website-out-of-googles-floc-network
  124. # - https://amifloced.org/
  125. #
  126. # Of course, a better solution is to just stop using browsers (like Chrome), which participate in such tracking practices.
  127. # See: `matrix_dimension_content_permission_policy`
  128. matrix_dimension_floc_optout_enabled: true
  129. # Controls if HSTS preloading is enabled
  130. #
  131. # In its strongest and recommended form, the [HSTS policy](https://www.chromium.org/hsts) includes all subdomains, and
  132. # indicates a willingness to be "preloaded" into browsers:
  133. # `Strict-Transport-Security: max-age=31536000; includeSubDomains; preload`
  134. # For more information visit:
  135. # - https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security
  136. # - https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security
  137. # - https://hstspreload.org/#opt-in
  138. # See: `matrix_dimension_http_header_strict_transport_security`
  139. matrix_dimension_hsts_preload_enabled: false
  140. # Database-related configuration fields.
  141. #
  142. # To use SQLite, stick to these defaults.
  143. #
  144. # To use Postgres:
  145. # - change the engine (`matrix_dimension_database_engine: 'postgres'`)
  146. # - adjust your database credentials via the `matrix_dimension_database_*` variables
  147. matrix_dimension_database_engine: 'sqlite'
  148. matrix_dimension_sqlite_database_path_local: "{{ matrix_dimension_base_path }}/dimension.db"
  149. matrix_dimension_sqlite_database_path_in_container: "dimension.db"
  150. matrix_dimension_database_username: 'matrix_dimension'
  151. matrix_dimension_database_password: 'some-password'
  152. matrix_dimension_database_hostname: ''
  153. matrix_dimension_database_port: 5432
  154. matrix_dimension_database_name: 'matrix_dimension'
  155. matrix_dimension_database_connection_string: 'postgres://{{ matrix_dimension_database_username }}:{{ matrix_dimension_database_password }}@{{ matrix_dimension_database_hostname }}:{{ matrix_dimension_database_port }}/{{ matrix_dimension_database_name }}'
  156. # Default Dimension configuration template which covers the generic use case.
  157. # You can customize it by controlling the various variables inside it.
  158. #
  159. # For a more advanced customization, you can extend the default (see `matrix_dimension_configuration_extension_yaml`)
  160. # or completely replace this variable with your own template.
  161. matrix_dimension_configuration_yaml: "{{ lookup('template', 'templates/config.yaml.j2') }}"
  162. matrix_dimension_configuration_extension_yaml: |
  163. # Your custom YAML configuration for Dimension goes here.
  164. # This configuration extends the default starting configuration (`matrix_dimension_configuration_yaml`).
  165. #
  166. # You can override individual variables from the default configuration, or introduce new ones.
  167. #
  168. # If you need something more special, you can take full control by
  169. # completely redefining `matrix_dimension_configuration_yaml`.
  170. #
  171. # Example configuration extension follows:
  172. # telegram:
  173. # botToken: "YourTokenHere"
  174. #
  175. matrix_dimension_configuration_extension: "{{ matrix_dimension_configuration_extension_yaml | from_yaml if matrix_dimension_configuration_extension_yaml | from_yaml is mapping else {} }}"
  176. # Holds the final Dimension configuration (a combination of the default and its extension).
  177. # You most likely don't need to touch this variable. Instead, see `matrix_dimension_configuration_yaml`.
  178. matrix_dimension_configuration: "{{ matrix_dimension_configuration_yaml | from_yaml | combine(matrix_dimension_configuration_extension, recursive=True) }}"