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.
 
 

160 linhas
8.0 KiB

  1. # SPDX-FileCopyrightText: 2024 - 2025 Slavi Pantaleev
  2. # SPDX-FileCopyrightText: 2024 - 2025 Suguru Hirahara
  3. #
  4. # SPDX-License-Identifier: AGPL-3.0-or-later
  5. ---
  6. # WeChat Bridge is a Matrix <-> WeChat bridge
  7. # Project source code URL: https://github.com/duo/matrix-wechat
  8. matrix_wechat_enabled: true
  9. # renovate: datasource=docker depName=lxduo/matrix-wechat
  10. matrix_wechat_version: 0.2.4
  11. matrix_wechat_container_image: "{{ matrix_wechat_container_image_registry_prefix }}lxduo/matrix-wechat:{{ matrix_wechat_version }}"
  12. matrix_wechat_container_image_registry_prefix: "{{ 'localhost/' if matrix_wechat_container_image_self_build else matrix_wechat_container_image_registry_prefix_upstream }}"
  13. matrix_wechat_container_image_registry_prefix_upstream: "{{ matrix_wechat_container_image_registry_prefix_upstream_default }}"
  14. matrix_wechat_container_image_registry_prefix_upstream_default: "docker.io/"
  15. matrix_wechat_container_image_force_pull: "{{ matrix_wechat_container_image.endswith(':latest') }}"
  16. matrix_wechat_container_image_self_build: false
  17. matrix_wechat_container_image_self_build_repo: "https://github.com/duo/matrix-wechat.git"
  18. matrix_wechat_container_image_self_build_branch: "{{ 'master' if matrix_wechat_version == 'latest' else matrix_wechat_version }}"
  19. # renovate: datasource=docker depName=lxduo/matrix-wechat-agent
  20. matrix_wechat_agent_version: 0.0.1
  21. matrix_wechat_agent_container_image: "{{ matrix_wechat_agent_container_image_name_prefix }}lxduo/matrix-wechat-agent:{{ matrix_wechat_agent_version }}"
  22. matrix_wechat_agent_container_image_name_prefix: "{{ 'localhost/' if matrix_wechat_agent_container_image_self_build else 'docker.io/' }}"
  23. matrix_wechat_agent_container_image_force_pull: "{{ matrix_wechat_agent_container_image.endswith(':latest') }}"
  24. # The agent needs to write to /home/user/.vnc.
  25. # `/home/user` is owned by `user:group` (`1000:1000`), so it needs to run with that user/group.
  26. matrix_wechat_agent_container_user_uid: 1000
  27. matrix_wechat_agent_container_user_gid: 1000
  28. matrix_wechat_agent_container_image_self_build: false
  29. matrix_wechat_agent_container_image_self_build_repo: "https://github.com/duo/matrix-wechat-agent.git"
  30. matrix_wechat_agent_container_image_self_build_branch: "{{ 'master' if matrix_wechat_agent_version == 'latest' else matrix_wechat_agent_version }}"
  31. matrix_wechat_base_path: "{{ matrix_base_data_path }}/wechat"
  32. matrix_wechat_config_path: "{{ matrix_wechat_base_path }}/config"
  33. matrix_wechat_data_path: "{{ matrix_wechat_base_path }}/data"
  34. matrix_wechat_container_src_files_path: "{{ matrix_wechat_base_path }}/container-src"
  35. matrix_wechat_agent_container_src_files_path: "{{ matrix_wechat_base_path }}/agent-container-src"
  36. matrix_wechat_homeserver_address: ""
  37. matrix_wechat_homeserver_domain: "{{ matrix_domain }}"
  38. matrix_wechat_appservice_address: 'http://matrix-wechat:8080'
  39. matrix_wechat_container_network: ""
  40. matrix_wechat_container_additional_networks: "{{ matrix_wechat_container_additional_networks_auto + matrix_wechat_container_additional_networks_custom }}"
  41. matrix_wechat_container_additional_networks_auto: []
  42. matrix_wechat_container_additional_networks_custom: []
  43. # A list of extra arguments to pass to the container
  44. matrix_wechat_container_extra_arguments: []
  45. # List of systemd services that matrix-wechat.service depends on.
  46. matrix_wechat_systemd_required_services_list: "{{ matrix_wechat_systemd_required_services_list_default + matrix_wechat_systemd_required_services_list_auto + matrix_wechat_systemd_required_services_list_custom }}"
  47. matrix_wechat_systemd_required_services_list_default: "{{ [devture_systemd_docker_base_docker_service_name] if devture_systemd_docker_base_docker_service_name else [] }}"
  48. matrix_wechat_systemd_required_services_list_auto: []
  49. matrix_wechat_systemd_required_services_list_custom: []
  50. # List of systemd services that matrix-wechat.service wants
  51. matrix_wechat_systemd_wanted_services_list: []
  52. matrix_wechat_appservice_token: ''
  53. matrix_wechat_homeserver_token: ''
  54. matrix_wechat_appservice_bot_username: wechatbot
  55. matrix_wechat_command_prefix: "!wechat"
  56. # Whether or not created rooms should have federation enabled.
  57. # If false, created portal rooms will never be federated.
  58. matrix_wechat_federate_rooms: true
  59. # Database-related configuration fields.
  60. matrix_wechat_database_engine: 'postgres'
  61. matrix_wechat_database_username: 'matrix_wechat'
  62. matrix_wechat_database_password: 'some-password'
  63. matrix_wechat_database_hostname: ''
  64. matrix_wechat_database_port: 5432
  65. matrix_wechat_database_name: 'matrix_wechat'
  66. matrix_wechat_database_sslmode: disable
  67. matrix_wechat_database_connection_string: 'postgresql://{{ matrix_wechat_database_username }}:{{ matrix_wechat_database_password }}@{{ matrix_wechat_database_hostname }}:{{ matrix_wechat_database_port }}/{{ matrix_wechat_database_name }}?sslmode={{ matrix_wechat_database_sslmode }}'
  68. matrix_wechat_bridge_listen_secret: ''
  69. # Can be set to enable automatic double-puppeting via Shared Secret Auth (https://github.com/devture/matrix-synapse-shared-secret-auth).
  70. matrix_wechat_login_shared_secret: ''
  71. matrix_wechat_login_shared_secret_map:
  72. "{{ {matrix_wechat_homeserver_domain: matrix_wechat_login_shared_secret} if matrix_wechat_login_shared_secret else {} }}"
  73. # Servers to always allow double puppeting from
  74. matrix_wechat_double_puppet_server_map:
  75. "{{ matrix_wechat_homeserver_domain: matrix_wechat_homeserver_address }}"
  76. # Enable End-to-bridge encryption
  77. matrix_wechat_encryption_allow: "{{ matrix_bridges_encryption_enabled }}"
  78. matrix_wechat_encryption_default: "{{ matrix_wechat_encryption_allow }}"
  79. # Minimum severity of journal log messages.
  80. # Valid values: fatal, error, warn, info, debug
  81. matrix_wechat_log_level: 'warn'
  82. matrix_wechat_permissions: |
  83. {{
  84. {matrix_wechat_homeserver_domain: 'user'}
  85. | combine({matrix_admin: 'admin'} if matrix_admin else {})
  86. }}
  87. # Default Wechat configuration template which covers the generic use case.
  88. # You can customize it by controlling the various variables inside it.
  89. #
  90. # For a more advanced customization, you can extend the default (see `matrix_wechat_configuration_extension_yaml`)
  91. # or completely replace this variable with your own template.
  92. matrix_wechat_configuration_yaml: "{{ lookup('template', 'templates/config.yaml.j2') }}"
  93. matrix_wechat_configuration_extension_yaml: |
  94. # Your custom YAML configuration goes here.
  95. # This configuration extends the default starting configuration (`matrix_wechat_configuration_yaml`).
  96. #
  97. # You can override individual variables from the default configuration, or introduce new ones.
  98. #
  99. # If you need something more special, you can take full control by
  100. # completely redefining `matrix_wechat_configuration_yaml`.
  101. matrix_wechat_configuration_extension: "{{ matrix_wechat_configuration_extension_yaml | from_yaml if matrix_wechat_configuration_extension_yaml | from_yaml is mapping else {} }}"
  102. # Holds the final configuration (a combination of the default and its extension).
  103. # You most likely don't need to touch this variable. Instead, see `matrix_wechat_configuration_yaml`.
  104. matrix_wechat_configuration: "{{ matrix_wechat_configuration_yaml | from_yaml | combine(matrix_wechat_configuration_extension, recursive=True) }}"
  105. matrix_wechat_registration_yaml: |
  106. id: wechat
  107. url: {{ matrix_wechat_appservice_address }}
  108. as_token: "{{ matrix_wechat_appservice_token }}"
  109. hs_token: "{{ matrix_wechat_homeserver_token }}"
  110. # See https://github.com/mautrix/signal/issues/43
  111. sender_localpart: _bot_{{ matrix_wechat_appservice_bot_username }}
  112. rate_limited: false
  113. namespaces:
  114. users:
  115. - regex: '^@_wechat_(.*):{{ matrix_wechat_homeserver_domain | regex_escape }}$'
  116. exclusive: true
  117. - exclusive: true
  118. regex: '^@{{ matrix_wechat_appservice_bot_username | regex_escape }}:{{ matrix_wechat_homeserver_domain | regex_escape }}$'
  119. de.sorunome.msc2409.push_ephemeral: true
  120. matrix_wechat_registration: "{{ matrix_wechat_registration_yaml | from_yaml }}"
  121. matrix_wechat_agent_service_secret: "{{ matrix_wechat_bridge_listen_secret }}"
  122. matrix_wechat_agent_configuration_yaml: "{{ lookup('template', 'templates/agent-config.yaml.j2') }}"
  123. matrix_wechat_agent_configuration: "{{ matrix_wechat_agent_configuration_yaml | from_yaml }}"