Signed-off-by: Suguru Hirahara <did🔑z6MkvVZk1A3KBApWJXv2Ju4H14ErDfRGxh8zxdXSZ4vACDg5>
create-pull-request/i18n
| @@ -1,112 +0,0 @@ | |||
| # SPDX-FileCopyrightText: 2022 - 2025 Slavi Pantaleev | |||
| # SPDX-FileCopyrightText: 2022 Julian-Samuel Gebühr | |||
| # SPDX-FileCopyrightText: 2022 MDAD project contributors | |||
| # | |||
| # SPDX-License-Identifier: AGPL-3.0-or-later | |||
| --- | |||
| # matrix_ldap_registration_proxy - Want to build a large-scale Matrix server using external registration on LDAP? | |||
| # Project source code URL: https://gitlab.com/activism.international/matrix_ldap_registration_proxy | |||
| matrix_ldap_registration_proxy_enabled: true | |||
| matrix_ldap_registration_proxy_hostname: '' | |||
| matrix_ldap_registration_proxy_container_image: "{{ matrix_ldap_registration_proxy_container_image_registry_prefix }}matrix_ldap_registration_proxy" | |||
| matrix_ldap_registration_proxy_container_image_registry_prefix: "{{ 'localhost/' if matrix_ldap_registration_proxy_container_image_self_build else matrix_ldap_registration_proxy_container_image_registry_prefix_upstream }}" | |||
| matrix_ldap_registration_proxy_container_image_registry_prefix_upstream: "{{ matrix_ldap_registration_proxy_container_image_registry_prefix_upstream_default }}" | |||
| matrix_ldap_registration_proxy_container_image_registry_prefix_upstream_default: "" | |||
| matrix_ldap_registration_proxy_container_image_self_build: true | |||
| matrix_ldap_registration_proxy_container_image_self_build_repo: "https://gitlab.com/activism.international/matrix_ldap_registration_proxy.git" | |||
| matrix_ldap_registration_proxy_container_image_self_build_branch: "{{ matrix_ldap_registration_proxy_version }}" | |||
| matrix_ldap_registration_proxy_version: "296246afc6a9b3105e67fcf6621cf05ebc74b873" | |||
| matrix_ldap_registration_proxy_base_path: "{{ matrix_base_data_path }}/matrix_ldap_registration_proxy" | |||
| # We need the docker src directory to be named matrix_ldap_registration_proxy. | |||
| matrix_ldap_registration_proxy_container_src_files_path: "{{ matrix_ldap_registration_proxy_base_path }}/docker-src/matrix_ldap_registration_proxy" | |||
| matrix_ldap_registration_proxy_config_path: "{{ matrix_ldap_registration_proxy_base_path }}/config" | |||
| matrix_ldap_registration_proxy_ldap_uri: "" | |||
| matrix_ldap_registration_proxy_ldap_base_dn: "" | |||
| matrix_ldap_registration_proxy_ldap_user: "" | |||
| matrix_ldap_registration_proxy_ldap_password: "" | |||
| matrix_ldap_registration_proxy_matrix_server_name: "{{ matrix_domain }}" | |||
| matrix_ldap_registration_proxy_matrix_server_url: "" | |||
| # Controls whether the self-check feature should validate SSL certificates. | |||
| matrix_matrix_ldap_registration_proxy_self_check_validate_certificates: true | |||
| matrix_ldap_registration_listen_port: 8080 | |||
| # Controls whether the matrix_ldap_registration_proxy container exposes its HTTP port (tcp/{{ matrix_ldap_registration_listen_port }} in the container). | |||
| # | |||
| # Takes an "<ip>:<port>" or "<port>" value (e.g. "127.0.0.1:8080"), or empty string to not expose. | |||
| matrix_ldap_registration_proxy_container_http_host_bind_port: '' | |||
| matrix_ldap_registration_proxy_container_network: "" | |||
| matrix_ldap_registration_proxy_container_additional_networks: "{{ matrix_ldap_registration_proxy_container_additional_networks_auto + matrix_ldap_registration_proxy_container_additional_networks_custom }}" | |||
| matrix_ldap_registration_proxy_container_additional_networks_auto: [] | |||
| matrix_ldap_registration_proxy_container_additional_networks_custom: [] | |||
| # matrix_ldap_registration_proxy_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_ldap_registration_proxy_container_labels_additional_labels`. | |||
| matrix_ldap_registration_proxy_container_labels_traefik_enabled: true | |||
| matrix_ldap_registration_proxy_container_labels_traefik_docker_network: "{{ matrix_ldap_registration_proxy_container_network }}" | |||
| matrix_ldap_registration_proxy_container_labels_traefik_entrypoints: web-secure | |||
| matrix_ldap_registration_proxy_container_labels_traefik_tls_certResolver: default # noqa var-naming | |||
| # Controls whether labels will be added that expose ldap-registration-proxy's registration endpoint (matrix_ldap_registration_proxy_container_labels_registration_endpoint_path) | |||
| matrix_ldap_registration_proxy_container_labels_registration_endpoint_enabled: true | |||
| matrix_ldap_registration_proxy_container_labels_registration_endpoint_hostname: "{{ matrix_ldap_registration_proxy_hostname }}" | |||
| matrix_ldap_registration_proxy_container_labels_registration_endpoint_path: "/_matrix/client/{version:(r0|v3)}/register" | |||
| matrix_ldap_registration_proxy_container_labels_registration_endpoint_traefik_rule: "Host(`{{ matrix_ldap_registration_proxy_container_labels_registration_endpoint_hostname }}`) && Path(`{{ matrix_ldap_registration_proxy_container_labels_registration_endpoint_path }}`)" | |||
| matrix_ldap_registration_proxy_container_labels_registration_endpoint_traefik_priority: 0 | |||
| matrix_ldap_registration_proxy_container_labels_registration_endpoint_traefik_entrypoints: "{{ matrix_ldap_registration_proxy_container_labels_traefik_entrypoints }}" | |||
| matrix_ldap_registration_proxy_container_labels_registration_endpoint_traefik_tls: "{{ matrix_ldap_registration_proxy_container_labels_registration_endpoint_traefik_entrypoints != 'web' }}" | |||
| matrix_ldap_registration_proxy_container_labels_registration_endpoint_traefik_tls_certResolver: "{{ matrix_ldap_registration_proxy_container_labels_traefik_tls_certResolver }}" # noqa var-naming | |||
| # matrix_ldap_registration_proxy_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_ldap_registration_proxy_container_labels_additional_labels: | | |||
| # my.label=1 | |||
| # another.label="here" | |||
| matrix_ldap_registration_proxy_container_labels_additional_labels: '' | |||
| # A list of extra arguments to pass to the container | |||
| matrix_ldap_registration_proxy_container_extra_arguments: [] | |||
| # List of systemd services that matrix-ldap-registration-proxy.service depends on. | |||
| matrix_ldap_registration_proxy_systemd_required_services_list: "{{ matrix_ldap_registration_proxy_systemd_required_services_list_default + matrix_ldap_registration_proxy_systemd_required_services_list_auto + matrix_ldap_registration_proxy_systemd_required_services_list_custom }}" | |||
| matrix_ldap_registration_proxy_systemd_required_services_list_default: "{{ [devture_systemd_docker_base_docker_service_name] if devture_systemd_docker_base_docker_service_name else [] }}" | |||
| matrix_ldap_registration_proxy_systemd_required_services_list_auto: [] | |||
| matrix_ldap_registration_proxy_systemd_required_services_list_custom: [] | |||
| # List of systemd services that matrix-ldap-registration-proxy.service wants | |||
| matrix_ldap_registration_proxy_systemd_wanted_services_list: "{{ matrix_ldap_registration_proxy_systemd_wanted_services_list_default + matrix_ldap_registration_proxy_systemd_wanted_services_list_auto + matrix_ldap_registration_proxy_systemd_wanted_services_list_custom }}" | |||
| matrix_ldap_registration_proxy_systemd_wanted_services_list_default: "{{ [devture_systemd_docker_base_docker_service_name] if devture_systemd_docker_base_docker_service_name else [] }}" | |||
| matrix_ldap_registration_proxy_systemd_wanted_services_list_auto: [] | |||
| matrix_ldap_registration_proxy_systemd_wanted_services_list_custom: [] | |||
| # Additional environment variables to pass to the LDAP proxy environment variables. | |||
| # | |||
| # Example: | |||
| # matrix_ldap_registration_proxy_env_variables_extension: | | |||
| # KEY=value | |||
| matrix_ldap_registration_proxy_env_variables_extension: '' | |||
| # matrix_ldap_registration_proxy_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_ldap_registration_proxy_restart_necessary: false | |||
| @@ -1,26 +0,0 @@ | |||
| # SPDX-FileCopyrightText: 2022 Julian-Samuel Gebühr | |||
| # SPDX-FileCopyrightText: 2022 MDAD project contributors | |||
| # SPDX-FileCopyrightText: 2023 - 2024 Slavi Pantaleev | |||
| # | |||
| # SPDX-License-Identifier: AGPL-3.0-or-later | |||
| --- | |||
| - tags: | |||
| - setup-all | |||
| - setup-matrix-ldap-registration-proxy | |||
| - install-all | |||
| - install-matrix-ldap-registration-proxy | |||
| block: | |||
| - when: matrix_ldap_registration_proxy_enabled | bool | |||
| ansible.builtin.include_tasks: "{{ role_path }}/tasks/validate_config.yml" | |||
| - when: matrix_ldap_registration_proxy_enabled | bool | |||
| ansible.builtin.include_tasks: "{{ role_path }}/tasks/setup_install.yml" | |||
| - tags: | |||
| - setup-all | |||
| - setup-matrix-ldap-registration-proxy | |||
| block: | |||
| - when: not matrix_ldap_registration_proxy_enabled | bool | |||
| ansible.builtin.include_tasks: "{{ role_path }}/tasks/setup_uninstall.yml" | |||
| @@ -1,85 +0,0 @@ | |||
| # SPDX-FileCopyrightText: 2022 - 2024 Slavi Pantaleev | |||
| # SPDX-FileCopyrightText: 2022 Julian-Samuel Gebühr | |||
| # SPDX-FileCopyrightText: 2022 MDAD project contributors | |||
| # SPDX-FileCopyrightText: 2022 Sebastian Gumprich | |||
| # SPDX-FileCopyrightText: 2024 David Mehren | |||
| # | |||
| # SPDX-License-Identifier: AGPL-3.0-or-later | |||
| --- | |||
| - name: Ensure matrix_ldap_registration_proxy paths exist | |||
| ansible.builtin.file: | |||
| path: "{{ item.path }}" | |||
| state: directory | |||
| mode: '0750' | |||
| owner: "{{ matrix_user_name }}" | |||
| group: "{{ matrix_group_name }}" | |||
| with_items: | |||
| - {path: "{{ matrix_ldap_registration_proxy_config_path }}", when: true} | |||
| - {path: "{{ matrix_ldap_registration_proxy_container_src_files_path }}", when: true} | |||
| when: "item.when | bool" | |||
| - name: Ensure matrix_ldap_registration_proxy repository is present on self-build | |||
| ansible.builtin.git: | |||
| repo: "{{ matrix_ldap_registration_proxy_container_image_self_build_repo }}" | |||
| dest: "{{ matrix_ldap_registration_proxy_container_src_files_path }}" | |||
| version: "{{ matrix_ldap_registration_proxy_container_image_self_build_branch }}" | |||
| force: "yes" | |||
| become: true | |||
| become_user: "{{ matrix_user_name }}" | |||
| register: matrix_ldap_registration_proxy_git_pull_results | |||
| - name: Ensure matrix_ldap_registration_proxy Docker image is built | |||
| community.docker.docker_image_build: | |||
| name: "{{ matrix_ldap_registration_proxy_container_image }}" | |||
| dockerfile: Dockerfile | |||
| path: "{{ matrix_ldap_registration_proxy_container_src_files_path }}" | |||
| pull: true | |||
| rebuild: "{{ 'always' if matrix_ldap_registration_proxy_git_pull_results.changed | bool else 'never' }}" | |||
| when: true | |||
| register: matrix_ldap_registration_proxy_container_image_build_result | |||
| - name: Ensure matrix_ldap_registration_proxy config installed | |||
| ansible.builtin.template: | |||
| src: "{{ role_path }}/templates/ldap-registration-proxy.env.j2" | |||
| dest: "{{ matrix_ldap_registration_proxy_config_path }}/ldap-registration-proxy.env" | |||
| mode: '0644' | |||
| owner: "{{ matrix_user_name }}" | |||
| group: "{{ matrix_group_name }}" | |||
| register: matrix_ldap_registration_proxy_config_result | |||
| - name: Ensure matrix-ldap-registration-proxy support files installed | |||
| ansible.builtin.template: | |||
| src: "{{ role_path }}/templates/{{ item }}.j2" | |||
| dest: "{{ matrix_ldap_registration_proxy_base_path }}/{{ item }}" | |||
| mode: '0640' | |||
| owner: "{{ matrix_user_name }}" | |||
| group: "{{ matrix_group_name }}" | |||
| with_items: | |||
| - labels | |||
| register: matrix_ldap_registration_proxy_support_files_result | |||
| - name: Ensure matrix-ldap-registration-proxy container network is created | |||
| community.general.docker_network: | |||
| enable_ipv6: "{{ devture_systemd_docker_base_ipv6_enabled }}" | |||
| name: "{{ matrix_ldap_registration_proxy_container_network }}" | |||
| driver: bridge | |||
| driver_options: "{{ devture_systemd_docker_base_container_networks_driver_options }}" | |||
| - name: Ensure matrix-ldap-registration-proxy.service installed | |||
| ansible.builtin.template: | |||
| src: "{{ role_path }}/templates/systemd/matrix-ldap-registration-proxy.service.j2" | |||
| dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-ldap-registration-proxy.service" | |||
| mode: '0644' | |||
| register: matrix_ldap_registration_proxy_systemd_service_result | |||
| - name: Determine whether matrix-ldap-registration-proxy needs a restart | |||
| ansible.builtin.set_fact: | |||
| matrix_ldap_registration_proxy_restart_necessary: >- | |||
| {{ | |||
| matrix_ldap_registration_proxy_config_result.changed | default(false) | |||
| or matrix_ldap_registration_proxy_support_files_result.changed | default(false) | |||
| or matrix_ldap_registration_proxy_systemd_service_result.changed | default(false) | |||
| or matrix_ldap_registration_proxy_container_image_build_result.changed | default(false) | |||
| }} | |||
| @@ -1,31 +0,0 @@ | |||
| # SPDX-FileCopyrightText: 2022 - 2023 Slavi Pantaleev | |||
| # SPDX-FileCopyrightText: 2022 MDAD project contributors | |||
| # SPDX-FileCopyrightText: 2022 Sebastian Gumprich | |||
| # | |||
| # SPDX-License-Identifier: AGPL-3.0-or-later | |||
| --- | |||
| - name: Check existence of matrix-matrix_ldap_registration_proxy service | |||
| ansible.builtin.stat: | |||
| path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-ldap-registration-proxy.service" | |||
| register: matrix_ldap_registration_proxy_service_stat | |||
| - when: matrix_ldap_registration_proxy_service_stat.stat.exists | bool | |||
| block: | |||
| - name: Ensure matrix-matrix_ldap_registration_proxy is stopped | |||
| ansible.builtin.service: | |||
| name: matrix-ldap-registration-proxy | |||
| state: stopped | |||
| enabled: false | |||
| daemon_reload: true | |||
| - name: Ensure matrix-ldap-registration-proxy.service doesn't exist | |||
| ansible.builtin.file: | |||
| path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-ldap-registration-proxy.service" | |||
| state: absent | |||
| - name: Ensure Matrix matrix_ldap_registration_proxy paths don't exist | |||
| ansible.builtin.file: | |||
| path: "{{ matrix_ldap_registration_proxy_base_path }}" | |||
| state: absent | |||
| @@ -1,38 +0,0 @@ | |||
| # SPDX-FileCopyrightText: 2022 - 2024 Slavi Pantaleev | |||
| # SPDX-FileCopyrightText: 2022 Julian-Samuel Gebühr | |||
| # SPDX-FileCopyrightText: 2022 MDAD project contributors | |||
| # SPDX-FileCopyrightText: 2025 Suguru Hirahara | |||
| # | |||
| # SPDX-License-Identifier: AGPL-3.0-or-later | |||
| --- | |||
| - name: (Deprecation) Catch and report renamed matrix-ldap-registration-proxy settings | |||
| ansible.builtin.fail: | |||
| msg: >- | |||
| Your configuration contains a variable, which now has a different name. | |||
| Please rename the variable (`{{ item.old }}` -> `{{ item.new }}`) on your configuration file (vars.yml). | |||
| when: "lookup('ansible.builtin.varnames', ('^' + item.old + '$'), wantlist=True) | length > 0" | |||
| with_items: | |||
| - {'old': 'matrix_ldap_registration_proxy_registration_addr_with_container', 'new': '<removed>'} | |||
| - {'old': 'matrix_ldap_registration_proxy_registration_addr_sans_container', 'new': '<removed>'} | |||
| - {'old': 'matrix_ldap_registration_proxy_container_port', 'new': 'matrix_ldap_registration_listen_port'} | |||
| - {'old': 'matrix_ldap_registration_proxy_registration_endpoint', 'new': 'matrix_ldap_registration_proxy_container_labels_registration_endpoint_path'} | |||
| - {'old': 'matrix_ldap_registration_proxy_docker_image', 'new': 'matrix_ldap_registration_proxy_container_image'} | |||
| - {'old': 'matrix_ldap_registration_proxy_docker_image_registry_prefix', 'new': 'matrix_ldap_registration_proxy_container_image_registry_prefix'} | |||
| - {'old': 'matrix_ldap_registration_proxy_docker_image_registry_prefix_upstream', 'new': 'matrix_ldap_registration_proxy_container_image_registry_prefix_upstream'} | |||
| - {'old': 'matrix_ldap_registration_proxy_docker_image_registry_prefix_upstream_default', 'new': 'matrix_ldap_registration_proxy_container_image_registry_prefix_upstream_default'} | |||
| - {'old': 'matrix_ldap_registration_proxy_docker_src_files_path', 'new': 'matrix_ldap_registration_proxy_container_src_files_path'} | |||
| - name: Fail if required matrix-ldap-registration-proxy settings not defined | |||
| ansible.builtin.fail: | |||
| msg: >- | |||
| You need to define a required configuration setting (`{{ item }}`). | |||
| when: "lookup('vars', item, default='') == ''" | |||
| with_items: | |||
| - "matrix_ldap_registration_proxy_hostname" | |||
| - "matrix_ldap_registration_proxy_ldap_uri" | |||
| - "matrix_ldap_registration_proxy_ldap_base_dn" | |||
| - "matrix_ldap_registration_proxy_ldap_user" | |||
| - "matrix_ldap_registration_proxy_ldap_password" | |||
| - "matrix_ldap_registration_proxy_container_network" | |||
| @@ -1,51 +0,0 @@ | |||
| {# | |||
| SPDX-FileCopyrightText: 2024 Slavi Pantaleev | |||
| SPDX-License-Identifier: AGPL-3.0-or-later | |||
| #} | |||
| {% if matrix_ldap_registration_proxy_container_labels_traefik_enabled %} | |||
| traefik.enable=true | |||
| {% if matrix_ldap_registration_proxy_container_labels_traefik_docker_network %} | |||
| traefik.docker.network={{ matrix_ldap_registration_proxy_container_labels_traefik_docker_network }} | |||
| {% endif %} | |||
| {% if matrix_ldap_registration_proxy_container_labels_registration_endpoint_enabled %} | |||
| ############################################################ | |||
| # # | |||
| # Registration # | |||
| # # | |||
| ############################################################ | |||
| traefik.http.services.matrix-ldap-registration-proxy.loadbalancer.server.port={{ matrix_ldap_registration_listen_port }} | |||
| traefik.http.middlewares.matrix-ldap-registration-proxy-registration-endpoint-replacepath.replacepath.path=/register | |||
| traefik.http.routers.matrix-ldap-registration-proxy-registration.rule={{ matrix_ldap_registration_proxy_container_labels_registration_endpoint_traefik_rule }} | |||
| traefik.http.routers.matrix-ldap-registration-proxy-registration.middlewares=matrix-ldap-registration-proxy-registration-endpoint-replacepath | |||
| {% if matrix_ldap_registration_proxy_container_labels_registration_endpoint_traefik_priority | int > 0 %} | |||
| traefik.http.routers.matrix-ldap-registration-proxy-registration.priority={{ matrix_ldap_registration_proxy_container_labels_registration_endpoint_traefik_priority }} | |||
| {% endif %} | |||
| traefik.http.routers.matrix-ldap-registration-proxy-registration.service=matrix-ldap-registration-proxy | |||
| traefik.http.routers.matrix-ldap-registration-proxy-registration.entrypoints={{ matrix_ldap_registration_proxy_container_labels_registration_endpoint_traefik_entrypoints }} | |||
| traefik.http.routers.matrix-ldap-registration-proxy-registration.tls={{ matrix_ldap_registration_proxy_container_labels_registration_endpoint_traefik_tls | to_json }} | |||
| {% if matrix_ldap_registration_proxy_container_labels_registration_endpoint_traefik_tls %} | |||
| traefik.http.routers.matrix-ldap-registration-proxy-registration.tls.certResolver={{ matrix_ldap_registration_proxy_container_labels_registration_endpoint_traefik_tls_certResolver }} | |||
| {% endif %} | |||
| ############################################################ | |||
| # # | |||
| # /Registration # | |||
| # # | |||
| ############################################################ | |||
| {% endif %} | |||
| {% endif %} | |||
| {{ matrix_ldap_registration_proxy_container_labels_additional_labels }} | |||
| @@ -1,43 +0,0 @@ | |||
| {# | |||
| SPDX-FileCopyrightText: 2022 - 2024 Slavi Pantaleev | |||
| SPDX-FileCopyrightText: 2022 Julian-Samuel Gebühr | |||
| SPDX-FileCopyrightText: 2022 MDAD project contributors | |||
| SPDX-License-Identifier: AGPL-3.0-or-later | |||
| #} | |||
| # please specify the configuration here | |||
| # | |||
| # these settings are mandatory | |||
| # The server to connect to. Please note it must be accessible from the Docker network | |||
| # example: `ldap://127.0.0.1:389` | |||
| LDAP_SERVER={{ matrix_ldap_registration_proxy_ldap_uri }} | |||
| # the base DN used for user creation | |||
| LDAP_BASE_DN={{ matrix_ldap_registration_proxy_ldap_base_dn }} | |||
| # the privileged user used for user creation including it's DN | |||
| # example: `uid=admin,cn=users,cn=accounts,dc=example,dc=org` | |||
| LDAP_USER={{ matrix_ldap_registration_proxy_ldap_user }} | |||
| # the password of the `LDAP_USER` used for authentication | |||
| LDAP_PASSWORD={{ matrix_ldap_registration_proxy_ldap_password }} | |||
| # the human-readable server name of your Matrix server as used in the Matrix ID | |||
| # example: `example.org` | |||
| MATRIX_SERVER_NAME={{ matrix_ldap_registration_proxy_matrix_server_name }} | |||
| # the url to access the Matrix server API without trailing `/` | |||
| # example: `https://matrix.example.org` | |||
| MATRIX_SERVER_URL={{ matrix_ldap_registration_proxy_matrix_server_url }} | |||
| # these settings are optional: | |||
| # Specify the port to listen on. Default to 8080 | |||
| LISTEN_PORT={{ matrix_ldap_registration_listen_port }} | |||
| # Use this to extend the configuration with custom variables | |||
| {{ matrix_ldap_registration_proxy_env_variables_extension }} | |||
| @@ -1,52 +0,0 @@ | |||
| #jinja2: lstrip_blocks: True | |||
| [Unit] | |||
| Description=matrix_ldap_registration_proxy | |||
| {% for service in matrix_ldap_registration_proxy_systemd_required_services_list %} | |||
| Requires={{ service }} | |||
| After={{ service }} | |||
| {% endfor %} | |||
| {% for service in matrix_ldap_registration_proxy_systemd_wanted_services_list %} | |||
| Wants={{ service }} | |||
| {% endfor %} | |||
| DefaultDependencies=no | |||
| [Service] | |||
| Type=simple | |||
| Environment="HOME={{ devture_systemd_docker_base_systemd_unit_home_path }}" | |||
| ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} stop -t {{ devture_systemd_docker_base_container_stop_grace_time_seconds }} matrix-ldap-registration-proxy 2>/dev/null || true' | |||
| ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-ldap-registration-proxy 2>/dev/null || true' | |||
| # matrix_ldap_registration_proxy writes an SQLite shared library (libsqlitejdbc.so) to /tmp and executes it from there, | |||
| # so /tmp needs to be mounted with an exec option. | |||
| ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \ | |||
| --rm \ | |||
| --name=matrix-ldap-registration-proxy \ | |||
| --log-driver=none \ | |||
| --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ | |||
| --cap-drop=ALL \ | |||
| --read-only \ | |||
| --network={{ matrix_ldap_registration_proxy_container_network }} \ | |||
| {% if matrix_ldap_registration_proxy_container_http_host_bind_port %} | |||
| -p {{ matrix_ldap_registration_proxy_container_http_host_bind_port }}:{{ matrix_ldap_registration_listen_port }} \ | |||
| {% endif %} | |||
| --env-file {{ matrix_ldap_registration_proxy_config_path }}/ldap-registration-proxy.env \ | |||
| --label-file={{ matrix_ldap_registration_proxy_base_path }}/labels \ | |||
| {% for arg in matrix_ldap_registration_proxy_container_extra_arguments %} | |||
| {{ arg }} \ | |||
| {% endfor %} | |||
| {{ matrix_ldap_registration_proxy_container_image }} | |||
| {% for network in matrix_ldap_registration_proxy_container_additional_networks %} | |||
| ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} network connect {{ network }} matrix-ldap-registration-proxy | |||
| {% endfor %} | |||
| ExecStart={{ devture_systemd_docker_base_host_command_docker }} start --attach matrix-ldap-registration-proxy | |||
| ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} stop -t {{ devture_systemd_docker_base_container_stop_grace_time_seconds }} matrix-ldap-registration-proxy 2>/dev/null || true' | |||
| ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-ldap-registration-proxy 2>/dev/null || true' | |||
| Restart=always | |||
| RestartSec=30 | |||
| SyslogIdentifier=matrix-ldap-registration-proxy | |||
| [Install] | |||
| WantedBy=multi-user.target | |||
| @@ -1,5 +0,0 @@ | |||
| SPDX-FileCopyrightText: 2022 - 2024 Slavi Pantaleev | |||
| SPDX-FileCopyrightText: 2022 Julian-Samuel Gebühr | |||
| SPDX-FileCopyrightText: 2022 MDAD project contributors | |||
| SPDX-License-Identifier: AGPL-3.0-or-later | |||