|
- # SPDX-FileCopyrightText: 2020 - 2025 Slavi Pantaleev
- # SPDX-FileCopyrightText: 2021 Aaron Raimist
- # SPDX-FileCopyrightText: 2021 Ahmad Haghighi
- # SPDX-FileCopyrightText: 2022 Marko Weltzer
- # SPDX-FileCopyrightText: 2022 Nikita Chernyi
- # SPDX-FileCopyrightText: 2023 Samuel Meenzen
- # SPDX-FileCopyrightText: 2024 Suguru Hirahara
- #
- # SPDX-License-Identifier: AGPL-3.0-or-later
-
- ---
- # matrix-registration is a simple python application to have a token based Matrix registration
- # See: https://zeratax.github.io/matrix-registration/
- # Project source code URL: https://github.com/ZerataX/matrix-registration
-
- matrix_registration_enabled: true
-
- matrix_registration_scheme: https
- matrix_registration_hostname: ''
- matrix_registration_path_prefix: /
-
- matrix_registration_container_image_self_build: false
- matrix_registration_container_image_self_build_repo: "https://github.com/ZerataX/matrix-registration"
- matrix_registration_container_image_self_build_branch: "{{ 'master' if matrix_registration_version == 'latest' else matrix_registration_version }}"
- # Controls whether we'll be patching the dependencies in `setup.py` when self-building.
- # Without patching, building will likely fail, because of the poor unbounded way dependencies are defined (e.g. `flask-limiter>=1.1.0`).
- # This is an attempt to get matrix-registration in its current (outdated) version to build.
- matrix_registration_container_image_self_build_python_dependencies_patch_enabled: true
-
- matrix_registration_base_path: "{{ matrix_base_data_path }}/matrix-registration"
- matrix_registration_config_path: "{{ matrix_registration_base_path }}/config"
- matrix_registration_data_path: "{{ matrix_registration_base_path }}/data"
- matrix_registration_docker_src_files_path: "{{ matrix_registration_base_path }}/docker-src"
-
- # renovate: datasource=docker depName=zeratax/matrix-registration
- matrix_registration_version: "v0.7.2"
-
- matrix_registration_docker_image: "{{ matrix_registration_docker_image_registry_prefix }}zeratax/matrix-registration:{{ matrix_registration_version }}"
- matrix_registration_docker_image_registry_prefix: "{{ 'localhost/' if matrix_registration_container_image_self_build else matrix_registration_docker_image_registry_prefix_upstream }}"
- matrix_registration_docker_image_registry_prefix_upstream: "{{ matrix_registration_docker_image_registry_prefix_upstream_default }}"
- matrix_registration_docker_image_registry_prefix_upstream_default: "docker.io/"
- matrix_registration_docker_image_force_pull: "{{ matrix_registration_docker_image.endswith(':latest') }}"
-
- matrix_registration_container_network: ""
-
- matrix_registration_container_additional_networks: "{{ matrix_registration_container_additional_networks_auto + matrix_registration_container_additional_networks_custom }}"
- matrix_registration_container_additional_networks_auto: []
- matrix_registration_container_additional_networks_custom: []
-
- # matrix_registration_container_labels_traefik_enabled controls whether labels to assist a Traefik reverse-proxy will be attached to the container.
- # See `../templates/labels.j2` for details.
- #
- # To inject your own other container labels, see `matrix_registration_container_labels_additional_labels`.
- matrix_registration_container_labels_traefik_enabled: true
- matrix_registration_container_labels_traefik_docker_network: "{{ matrix_registration_container_network }}"
- matrix_registration_container_labels_traefik_entrypoints: web-secure
- matrix_registration_container_labels_traefik_tls_certResolver: default # noqa var-naming
-
- # Controls whether labels will be added that expose matrix-registration's public endpoints
- matrix_registration_container_labels_public_endpoint_enabled: true
- matrix_registration_container_labels_public_endpoint_traefik_rule: "Host(`{{ matrix_registration_hostname }}`){% if matrix_registration_path_prefix != '/' %} && PathPrefix(`{{ matrix_registration_path_prefix }}`){% endif %}"
- matrix_registration_container_labels_public_endpoint_traefik_priority: 0
- matrix_registration_container_labels_public_endpoint_traefik_entrypoints: "{{ matrix_registration_container_labels_traefik_entrypoints }}"
- matrix_registration_container_labels_public_endpoint_traefik_tls: "{{ matrix_registration_container_labels_public_endpoint_traefik_entrypoints != 'web' }}"
- matrix_registration_container_labels_public_endpoint_traefik_tls_certResolver: "{{ matrix_registration_container_labels_traefik_tls_certResolver }}" # noqa var-naming
-
- # matrix_registration_container_labels_additional_labels contains a multiline string with additional labels to add to the container label file.
- # See `../templates/labels.j2` for details.
- #
- # Example:
- # matrix_registration_container_labels_additional_labels: |
- # my.label=1
- # another.label="here"
- matrix_registration_container_labels_additional_labels: ''
-
- # A list of extra arguments to pass to the container
- matrix_registration_container_extra_arguments: []
-
- # List of systemd services that matrix-registration.service depends on
- 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 }}"
- matrix_registration_systemd_required_services_list_default: "{{ [devture_systemd_docker_base_docker_service_name] if devture_systemd_docker_base_docker_service_name else [] }}"
- matrix_registration_systemd_required_services_list_auto: []
- matrix_registration_systemd_required_services_list_custom: []
-
- # List of systemd services that matrix-registration.service wants
- matrix_registration_systemd_wanted_services_list: []
-
- # Controls whether the matrix-registration container exposes its HTTP port (tcp/5000 in the container).
- #
- # Takes an "<ip>:<port>" or "<port>" value (e.g. "127.0.0.1:8767"), or empty string to not expose.
- matrix_registration_container_http_host_bind_port: ''
-
- # Database-related configuration fields.
- #
- # To use SQLite, stick to these defaults.
- #
- # To use Postgres:
- # - change the engine (`matrix_registration_database_engine: 'postgres'`)
- # - adjust your database credentials via the `matrix_registration_database_*` variables
- matrix_registration_database_engine: 'sqlite'
-
- matrix_registration_sqlite_database_path_local: "{{ matrix_registration_data_path }}/db.sqlite3"
- matrix_registration_sqlite_database_path_in_container: "/data/db.sqlite3"
-
- matrix_registration_database_username: 'matrix_registration'
- matrix_registration_database_password: 'some-password'
- matrix_registration_database_hostname: ''
- matrix_registration_database_port: 5432
- matrix_registration_database_name: 'matrix_registration'
-
- 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 }}'
-
- # For some reason, matrix-registraiton expects the `db` field to be like this: `sqlite:////data/db.sqlite3`.
- # (seems like one too many slashes, but..)
- matrix_registration_db: "{{
- {
- 'sqlite': ('sqlite:///' + matrix_registration_sqlite_database_path_in_container),
- 'postgres': matrix_registration_database_connection_string,
- }[matrix_registration_database_engine]
- }}"
-
- matrix_registration_base_url: "{{ matrix_registration_path_prefix }}"
-
- matrix_registration_api_register_endpoint: "{{ matrix_registration_scheme }}://{{ matrix_registration_hostname }}{{ matrix_registration_base_url }}{{ '' if matrix_registration_base_url == '/' else '/' }}register"
- matrix_registration_api_token_endpoint: "{{ matrix_registration_scheme }}://{{ matrix_registration_hostname }}{{ matrix_registration_base_url }}{{ '' if matrix_registration_base_url == '/' else '/' }}token"
-
- matrix_registration_api_validate_certs: true
-
- # The URL to your homeserver (e.g.: `https://matrix.example.com`).
- # A local (in-container address) is preferable.
- matrix_registration_server_location: ""
-
- matrix_registration_server_name: "{{ matrix_domain }}"
-
- # matrix_registration_shared_secret needs to match the homeserver's registration secret.
- # For Synapse, that's the `registration_shared_secret` setting.
- matrix_registration_shared_secret: ""
-
- # matrix_registration_admin_secret is your own admin secret for using matrix-registration (creating new tokens, etc.)
- matrix_registration_admin_secret: ""
-
- matrix_registration_riot_instance: "https://element.io/app/"
-
- # Default matrix-registration configuration template which covers the generic use case.
- # You can customize it by controlling the various variables inside it.
- #
- # For a more advanced customization, you can extend the default (see `matrix_registration_configuration_extension_yaml`)
- # or completely replace this variable with your own template.
- matrix_registration_configuration_yaml: "{{ lookup('template', 'templates/config.yaml.j2') }}"
-
- matrix_registration_configuration_extension_yaml: |
- # Your custom YAML configuration for registration goes here.
- # This configuration extends the default starting configuration (`matrix_registration_configuration_yaml`).
- #
- # You can override individual variables from the default configuration, or introduce new ones.
- #
- # If you need something more special, you can take full control by
- # completely redefining `matrix_registration_configuration_yaml`.
- #
- # Example configuration extension follows:
- #
- # password:
- # min_length: 12
-
- matrix_registration_configuration_extension: "{{ matrix_registration_configuration_extension_yaml | from_yaml if matrix_registration_configuration_extension_yaml | from_yaml is mapping else {} }}"
-
- # Holds the final matrix-registration configuration (a combination of the default and its extension).
- # You most likely don't need to touch this variable. Instead, see `matrix_registration_configuration_yaml`.
- matrix_registration_configuration: "{{ matrix_registration_configuration_yaml | from_yaml | combine(matrix_registration_configuration_extension, recursive=True) }}"
-
- # matrix_registration_restart_necessary controls whether the service
- # will be restarted (when true) or merely started (when false) by the
- # systemd service manager role (when conditional restart is enabled).
- #
- # This value is automatically computed during installation based on whether
- # any configuration files, the systemd service file, or the container image changed.
- # The default of `false` means "no restart needed" — appropriate when the role's
- # installation tasks haven't run (e.g., due to --tags skipping them).
- matrix_registration_restart_necessary: false
|