Matrix Docker Ansible eploy
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

170 lines
9.8 KiB

  1. # SPDX-FileCopyrightText: 2020 - 2025 Slavi Pantaleev
  2. # SPDX-FileCopyrightText: 2021 Ahmad Haghighi
  3. # SPDX-FileCopyrightText: 2021 Aaron Raimist
  4. # SPDX-FileCopyrightText: 2022 Marko Weltzer
  5. # SPDX-FileCopyrightText: 2022 Nikita Chernyi
  6. # SPDX-FileCopyrightText: 2023 Samuel Meenzen
  7. # SPDX-FileCopyrightText: 2024 Suguru Hirahara
  8. #
  9. # SPDX-License-Identifier: AGPL-3.0-or-later
  10. ---
  11. # matrix-registration is a simple python application to have a token based Matrix registration
  12. # See: https://zeratax.github.io/matrix-registration/
  13. # Project source code URL: https://github.com/ZerataX/matrix-registration
  14. matrix_registration_enabled: true
  15. matrix_registration_scheme: https
  16. matrix_registration_hostname: ''
  17. matrix_registration_path_prefix: /
  18. matrix_registration_container_image_self_build: false
  19. matrix_registration_container_image_self_build_repo: "https://github.com/ZerataX/matrix-registration"
  20. matrix_registration_container_image_self_build_branch: "{{ 'master' if matrix_registration_version == 'latest' else matrix_registration_version }}"
  21. # Controls whether we'll be patching the dependencies in `setup.py` when self-building.
  22. # Without patching, building will likely fail, because of the poor unbounded way dependencies are defined (e.g. `flask-limiter>=1.1.0`).
  23. # This is an attempt to get matrix-registration in its current (outdated) version to build.
  24. matrix_registration_container_image_self_build_python_dependencies_patch_enabled: true
  25. matrix_registration_base_path: "{{ matrix_base_data_path }}/matrix-registration"
  26. matrix_registration_config_path: "{{ matrix_registration_base_path }}/config"
  27. matrix_registration_data_path: "{{ matrix_registration_base_path }}/data"
  28. matrix_registration_docker_src_files_path: "{{ matrix_registration_base_path }}/docker-src"
  29. # renovate: datasource=docker depName=zeratax/matrix-registration
  30. matrix_registration_version: "v0.7.2"
  31. matrix_registration_docker_image: "{{ matrix_registration_docker_image_registry_prefix }}zeratax/matrix-registration:{{ matrix_registration_version }}"
  32. matrix_registration_docker_image_registry_prefix: "{{ 'localhost/' if matrix_registration_container_image_self_build else matrix_registration_docker_image_registry_prefix_upstream }}"
  33. matrix_registration_docker_image_registry_prefix_upstream: "{{ matrix_registration_docker_image_registry_prefix_upstream_default }}"
  34. matrix_registration_docker_image_registry_prefix_upstream_default: "docker.io/"
  35. matrix_registration_docker_image_force_pull: "{{ matrix_registration_docker_image.endswith(':latest') }}"
  36. matrix_registration_container_network: ""
  37. matrix_registration_container_additional_networks: "{{ matrix_registration_container_additional_networks_auto + matrix_registration_container_additional_networks_custom }}"
  38. matrix_registration_container_additional_networks_auto: []
  39. matrix_registration_container_additional_networks_custom: []
  40. # matrix_registration_container_labels_traefik_enabled controls whether labels to assist a Traefik reverse-proxy will be attached to the container.
  41. # See `../templates/labels.j2` for details.
  42. #
  43. # To inject your own other container labels, see `matrix_registration_container_labels_additional_labels`.
  44. matrix_registration_container_labels_traefik_enabled: true
  45. matrix_registration_container_labels_traefik_docker_network: "{{ matrix_registration_container_network }}"
  46. matrix_registration_container_labels_traefik_entrypoints: web-secure
  47. matrix_registration_container_labels_traefik_tls_certResolver: default # noqa var-naming
  48. # Controls whether labels will be added that expose matrix-registration's public endpoints
  49. matrix_registration_container_labels_public_endpoint_enabled: true
  50. matrix_registration_container_labels_public_endpoint_traefik_rule: "Host(`{{ matrix_registration_hostname }}`){% if matrix_registration_path_prefix != '/' %} && PathPrefix(`{{ matrix_registration_path_prefix }}`){% endif %}"
  51. matrix_registration_container_labels_public_endpoint_traefik_priority: 0
  52. matrix_registration_container_labels_public_endpoint_traefik_entrypoints: "{{ matrix_registration_container_labels_traefik_entrypoints }}"
  53. matrix_registration_container_labels_public_endpoint_traefik_tls: "{{ matrix_registration_container_labels_public_endpoint_traefik_entrypoints != 'web' }}"
  54. matrix_registration_container_labels_public_endpoint_traefik_tls_certResolver: "{{ matrix_registration_container_labels_traefik_tls_certResolver }}" # noqa var-naming
  55. # matrix_registration_container_labels_additional_labels contains a multiline string with additional labels to add to the container label file.
  56. # See `../templates/labels.j2` for details.
  57. #
  58. # Example:
  59. # matrix_registration_container_labels_additional_labels: |
  60. # my.label=1
  61. # another.label="here"
  62. matrix_registration_container_labels_additional_labels: ''
  63. # A list of extra arguments to pass to the container
  64. matrix_registration_container_extra_arguments: []
  65. # List of systemd services that matrix-registration.service depends on
  66. matrix_registration_systemd_required_services_list: "{{ matrix_registration_systemd_required_services_list_default + matrix_registration_systemd_required_services_list_auto + matrix_registration_systemd_required_services_list_custom }}"
  67. matrix_registration_systemd_required_services_list_default: "{{ [devture_systemd_docker_base_docker_service_name] if devture_systemd_docker_base_docker_service_name else [] }}"
  68. matrix_registration_systemd_required_services_list_auto: []
  69. matrix_registration_systemd_required_services_list_custom: []
  70. # List of systemd services that matrix-registration.service wants
  71. matrix_registration_systemd_wanted_services_list: []
  72. # Controls whether the matrix-registration container exposes its HTTP port (tcp/5000 in the container).
  73. #
  74. # Takes an "<ip>:<port>" or "<port>" value (e.g. "127.0.0.1:8767"), or empty string to not expose.
  75. matrix_registration_container_http_host_bind_port: ''
  76. # Database-related configuration fields.
  77. #
  78. # To use SQLite, stick to these defaults.
  79. #
  80. # To use Postgres:
  81. # - change the engine (`matrix_registration_database_engine: 'postgres'`)
  82. # - adjust your database credentials via the `matrix_registration_database_*` variables
  83. matrix_registration_database_engine: 'sqlite'
  84. matrix_registration_sqlite_database_path_local: "{{ matrix_registration_data_path }}/db.sqlite3"
  85. matrix_registration_sqlite_database_path_in_container: "/data/db.sqlite3"
  86. matrix_registration_database_username: 'matrix_registration'
  87. matrix_registration_database_password: 'some-password'
  88. matrix_registration_database_hostname: ''
  89. matrix_registration_database_port: 5432
  90. matrix_registration_database_name: 'matrix_registration'
  91. matrix_registration_database_connection_string: 'postgresql://{{ matrix_registration_database_username }}:{{ matrix_registration_database_password }}@{{ matrix_registration_database_hostname }}:{{ matrix_registration_database_port }}/{{ matrix_registration_database_name }}'
  92. # For some reason, matrix-registraiton expects the `db` field to be like this: `sqlite:////data/db.sqlite3`.
  93. # (seems like one too many slashes, but..)
  94. matrix_registration_db: "{{
  95. {
  96. 'sqlite': ('sqlite:///' + matrix_registration_sqlite_database_path_in_container),
  97. 'postgres': matrix_registration_database_connection_string,
  98. }[matrix_registration_database_engine]
  99. }}"
  100. matrix_registration_base_url: "{{ matrix_registration_path_prefix }}"
  101. matrix_registration_api_register_endpoint: "{{ matrix_registration_scheme }}://{{ matrix_registration_hostname }}{{ matrix_registration_base_url }}{{ '' if matrix_registration_base_url == '/' else '/' }}register"
  102. matrix_registration_api_token_endpoint: "{{ matrix_registration_scheme }}://{{ matrix_registration_hostname }}{{ matrix_registration_base_url }}{{ '' if matrix_registration_base_url == '/' else '/' }}token"
  103. matrix_registration_api_validate_certs: true
  104. # The URL to your homeserver (e.g.: `https://matrix.example.com`).
  105. # A local (in-container address) is preferable.
  106. matrix_registration_server_location: ""
  107. matrix_registration_server_name: "{{ matrix_domain }}"
  108. # matrix_registration_shared_secret needs to match the homeserver's registration secret.
  109. # For Synapse, that's the `registration_shared_secret` setting.
  110. matrix_registration_shared_secret: ""
  111. # matrix_registration_admin_secret is your own admin secret for using matrix-registration (creating new tokens, etc.)
  112. matrix_registration_admin_secret: ""
  113. matrix_registration_riot_instance: "https://element.io/app/"
  114. # Default matrix-registration configuration template which covers the generic use case.
  115. # You can customize it by controlling the various variables inside it.
  116. #
  117. # For a more advanced customization, you can extend the default (see `matrix_registration_configuration_extension_yaml`)
  118. # or completely replace this variable with your own template.
  119. matrix_registration_configuration_yaml: "{{ lookup('template', 'templates/config.yaml.j2') }}"
  120. matrix_registration_configuration_extension_yaml: |
  121. # Your custom YAML configuration for registration goes here.
  122. # This configuration extends the default starting configuration (`matrix_registration_configuration_yaml`).
  123. #
  124. # You can override individual variables from the default configuration, or introduce new ones.
  125. #
  126. # If you need something more special, you can take full control by
  127. # completely redefining `matrix_registration_configuration_yaml`.
  128. #
  129. # Example configuration extension follows:
  130. #
  131. # password:
  132. # min_length: 12
  133. matrix_registration_configuration_extension: "{{ matrix_registration_configuration_extension_yaml | from_yaml if matrix_registration_configuration_extension_yaml | from_yaml is mapping else {} }}"
  134. # Holds the final matrix-registration configuration (a combination of the default and its extension).
  135. # You most likely don't need to touch this variable. Instead, see `matrix_registration_configuration_yaml`.
  136. matrix_registration_configuration: "{{ matrix_registration_configuration_yaml | from_yaml | combine(matrix_registration_configuration_extension, recursive=True) }}"