Matrix Docker Ansible eploy
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 

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