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.
 
 

174 linhas
11 KiB

  1. # SPDX-FileCopyrightText: 2024 MDAD Team and contributors
  2. #
  3. # SPDX-License-Identifier: AGPL-3.0-or-later
  4. ---
  5. # matrix-corporal is a reconciliator and gateway for a managed Matrix server.
  6. # Project source code URL: https://github.com/devture/matrix-corporal
  7. matrix_corporal_enabled: true
  8. # renovate: datasource=docker depName=devture/matrix-corporal
  9. matrix_corporal_version: 3.1.1
  10. matrix_corporal_container_image_self_build: false
  11. matrix_corporal_container_image_self_build_repo: "https://github.com/devture/matrix-corporal.git"
  12. # Controls whether the matrix-corporal container exposes its gateway HTTP port (tcp/41080 in the container).
  13. #
  14. # Takes an "<ip>:<port>" or "<port>" value (e.g. "127.0.0.1:41080"), or empty string to not expose.
  15. matrix_corporal_container_http_gateway_host_bind_port: ''
  16. # Controls whether the matrix-corporal container exposes its API HTTP port (tcp/41081 in the container).
  17. #
  18. # Takes an "<ip>:<port>" or "<port>" value (e.g. "127.0.0.1:41081"), or empty string to not expose.
  19. matrix_corporal_container_http_api_host_bind_port: ''
  20. # A list of extra arguments to pass to the container
  21. matrix_corporal_container_extra_arguments: []
  22. # The base container network. It will be auto-created by this role if it doesn't exist already.
  23. matrix_corporal_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 another reverse proxy, which runs in a different container network.
  27. matrix_corporal_container_additional_networks: "{{ matrix_corporal_container_additional_networks_auto + matrix_corporal_container_additional_networks_custom }}"
  28. matrix_corporal_container_additional_networks_auto: []
  29. matrix_corporal_container_additional_networks_custom: []
  30. # matrix_corporal_container_labels_traefik_enabled controls whether labels to assist a Traefik reverse-proxy will be attached to the container.
  31. # See `../templates/labels.j2` for details.
  32. #
  33. # To inject your own other container labels, see `matrix_corporal_container_labels_additional_labels`.
  34. matrix_corporal_container_labels_traefik_enabled: true
  35. matrix_corporal_container_labels_traefik_docker_network: "{{ matrix_corporal_container_network }}"
  36. matrix_corporal_container_labels_traefik_entrypoints: web-secure
  37. matrix_corporal_container_labels_traefik_tls: "{{ matrix_corporal_container_labels_traefik_entrypoints != 'web' }}"
  38. matrix_corporal_container_labels_traefik_tls_certResolver: default # noqa var-naming
  39. # Controls whether labels will be added that expose matrix-corporal's HTTP API (/_matrix/corporal).
  40. # Because we also capture all of `/_matrix` for the Client-Server API below (see `matrix_corporal_container_labels_matrix_client_api_*`)
  41. # and we explicitly set a higher priority on it (to ensure we capture it instead of the homeserver),
  42. # we also need to tweak the priority of this router, to avoid its requests going to the other one.
  43. matrix_corporal_container_labels_api_enabled: "{{ matrix_corporal_http_api_enabled }}"
  44. matrix_corporal_container_labels_api_traefik_rule: "Host(`{{ matrix_corporal_matrix_homeserver_api_domain_name }}`) && PathPrefix(`/_matrix/corporal`)"
  45. matrix_corporal_container_labels_api_traefik_priority: "{{ matrix_corporal_container_labels_matrix_client_api_traefik_priority + 500 }}"
  46. matrix_corporal_container_labels_api_traefik_entrypoints: "{{ matrix_corporal_container_labels_traefik_entrypoints }}"
  47. matrix_corporal_container_labels_api_traefik_tls: "{{ matrix_corporal_container_labels_traefik_tls }}"
  48. matrix_corporal_container_labels_api_traefik_tls_certResolver: "{{ matrix_corporal_container_labels_traefik_tls_certResolver }}" # noqa var-naming
  49. # Controls whether labels will be added that expose the Matrix Client-Server API (/_matrix).
  50. # By default, we try to capture these requests with higher priority than the running homeserver,
  51. # so that matrix-corporal can do its job of firewalling, etc.
  52. matrix_corporal_container_labels_matrix_client_api_enabled: true
  53. matrix_corporal_container_labels_matrix_client_api_traefik_hostname: "{{ matrix_corporal_matrix_homeserver_api_domain_name }}"
  54. matrix_corporal_container_labels_matrix_client_api_traefik_path_prefix: /_matrix
  55. matrix_corporal_container_labels_matrix_client_api_traefik_rule: "Host(`{{ matrix_corporal_container_labels_matrix_client_api_traefik_hostname }}`) && PathPrefix(`{{ matrix_corporal_container_labels_matrix_client_api_traefik_path_prefix }}`)"
  56. matrix_corporal_container_labels_matrix_client_api_traefik_priority: 500
  57. matrix_corporal_container_labels_matrix_client_api_traefik_entrypoints: "{{ matrix_corporal_container_labels_traefik_entrypoints }}"
  58. matrix_corporal_container_labels_matrix_client_api_traefik_tls: "{{ matrix_corporal_container_labels_matrix_client_api_traefik_entrypoints != 'web' }}"
  59. matrix_corporal_container_labels_matrix_client_api_traefik_tls_certResolver: "{{ matrix_corporal_container_labels_traefik_tls_certResolver }}" # noqa var-naming
  60. # matrix_corporal_container_labels_additional_labels contains a multiline string with additional labels to add to the container label file.
  61. # See `../templates/labels.j2` for details.
  62. #
  63. # Example:
  64. # matrix_corporal_container_labels_additional_labels: |
  65. # my.label=1
  66. # another.label="here"
  67. matrix_corporal_container_labels_additional_labels: ''
  68. # List of systemd services that matrix-corporal.service depends on
  69. matrix_corporal_systemd_required_services_list: "{{ matrix_corporal_systemd_required_services_list_default + matrix_corporal_systemd_required_services_list_auto + matrix_corporal_systemd_required_services_list_custom }}"
  70. matrix_corporal_systemd_required_services_list_default: "{{ [devture_systemd_docker_base_docker_service_name] if devture_systemd_docker_base_docker_service_name else [] }}"
  71. matrix_corporal_systemd_required_services_list_auto: []
  72. matrix_corporal_systemd_required_services_list_custom: []
  73. matrix_corporal_docker_image: "{{ matrix_corporal_docker_image_name_prefix }}devture/matrix-corporal:{{ matrix_corporal_docker_image_tag }}"
  74. matrix_corporal_docker_image_name_prefix: "{{ 'localhost/' if matrix_corporal_container_image_self_build else matrix_container_global_registry_prefix }}"
  75. matrix_corporal_docker_image_tag: "{{ matrix_corporal_version }}" # for backward-compatibility
  76. matrix_corporal_docker_image_force_pull: "{{ matrix_corporal_docker_image.endswith(':latest') }}"
  77. matrix_corporal_base_path: "{{ matrix_base_data_path }}/corporal"
  78. matrix_corporal_container_src_files_path: "{{ matrix_corporal_base_path }}/container-src"
  79. matrix_corporal_config_dir_path: "{{ matrix_corporal_base_path }}/config"
  80. matrix_corporal_cache_dir_path: "{{ matrix_corporal_base_path }}/cache"
  81. matrix_corporal_var_dir_path: "{{ matrix_corporal_base_path }}/var"
  82. matrix_corporal_matrix_homeserver_scheme: https
  83. matrix_corporal_matrix_homeserver_domain_name: "{{ matrix_domain }}"
  84. matrix_corporal_matrix_homeserver_api_domain_name: "{{ matrix_server_fqn_matrix }}"
  85. # Controls where matrix-corporal can reach your Synapse server (e.g. "http://matrix-synapse-reverse-proxy-companion:{{ matrix_synapse_container_client_api_port }}").
  86. # If Synapse runs on the same machine, you may need to add its service to `matrix_corporal_systemd_required_services_list`.
  87. matrix_corporal_matrix_homeserver_api_endpoint: ""
  88. # The shared secret between matrix-corporal and Synapse's shared-secret-auth password provider module.
  89. # To use matrix-corporal, the shared-secret-auth password provider needs to be enabled and the secret needs to be identical.
  90. matrix_corporal_matrix_auth_shared_secret: ""
  91. # The shared secret for registering users with Synapse.
  92. # Needs to be identical to Synapse's `registration_shared_secret` setting.
  93. matrix_corporal_matrix_registration_shared_secret: ""
  94. matrix_corporal_matrix_timeout_milliseconds: 45000
  95. matrix_corporal_reconciliation_retry_interval_milliseconds: 30000
  96. matrix_corporal_corporal_user_id_local_part: "matrix-corporal"
  97. matrix_corporal_http_gateway_timeout_milliseconds: 60000
  98. # If enabled, matrix-corporal exposes a `POST /_matrix/corporal/_matrix-internal/identity/v1/check_credentials` API
  99. # on the gateway (Client-Server API) server.
  100. # This API can then be used together with the REST Auth password provider by pointing it to matrix-corporal (e.g. `http://matrix-corporal:41080/_matrix/corporal`).
  101. # Doing so allows Interactive Authentication to work.
  102. matrix_corporal_http_gateway_internal_rest_auth_enabled: false
  103. matrix_corporal_http_api_enabled: false
  104. matrix_corporal_http_api_auth_token: ""
  105. matrix_corporal_http_api_timeout_milliseconds: 15000
  106. # Matrix Corporal policy provider configuration (goes directly into the configuration's `PolicyProvider` value)
  107. matrix_corporal_policy_provider_config: ""
  108. matrix_corporal_debug: false
  109. # Default Corporal configuration template which covers the generic use case.
  110. # You can customize it by controlling the various variables inside it.
  111. #
  112. # For a more advanced customization, you can extend the default (see `matrix_corporal_configuration_extension_json`)
  113. # or completely replace this variable with your own template.
  114. #
  115. # The side-effect of this lookup is that Ansible would even parse the JSON for us, returning a dict.
  116. # This is unlike what it does when looking up YAML template files (no automatic parsing there).
  117. matrix_corporal_configuration_default: "{{ lookup('template', 'templates/config.json.j2') }}"
  118. # Your custom JSON configuration for Corporal should go to `matrix_corporal_configuration_extension_json`.
  119. # This configuration extends the default starting configuration (`matrix_corporal_configuration_default`).
  120. #
  121. # You can override individual variables from the default configuration, or introduce new ones.
  122. #
  123. # If you need something more special, you can take full control by
  124. # completely redefining `matrix_corporal_configuration_default`.
  125. #
  126. # Example configuration extension follows:
  127. #
  128. # matrix_corporal_configuration_extension_json: |
  129. # {
  130. # "Matrix": {
  131. # "TimeoutMilliseconds": 60000
  132. # }
  133. # }
  134. matrix_corporal_configuration_extension_json: '{}'
  135. matrix_corporal_configuration_extension: "{{ matrix_corporal_configuration_extension_json | from_json if matrix_corporal_configuration_extension_json | from_json is mapping else {} }}"
  136. # Holds the final Corporal configuration (a combination of the default and its extension).
  137. # You most likely don't need to touch this variable. Instead, see `matrix_corporal_configuration_default`.
  138. matrix_corporal_configuration: "{{ matrix_corporal_configuration_default | combine(matrix_corporal_configuration_extension, recursive=True) }}"
  139. matrix_corporal_self_check_matrix_client_api_url_endpoint_public: "{{ matrix_corporal_matrix_homeserver_scheme }}://{{ matrix_corporal_matrix_homeserver_api_domain_name }}/_matrix/client/corporal"
  140. matrix_corporal_self_check_corporal_api_url_endpoint_public: "{{ matrix_corporal_matrix_homeserver_scheme }}://{{ matrix_corporal_matrix_homeserver_api_domain_name }}/_matrix/corporal/policy"