Signed-off-by: Suguru Hirahara <did🔑z6MkvVZk1A3KBApWJXv2Ju4H14ErDfRGxh8zxdXSZ4vACDg5>
pull/4932/head
| @@ -88,6 +88,6 @@ To use Synapse Admin, you need to have [registered at least one administrator ac | |||
| ## Troubleshooting | |||
| As with all other services, you can find the logs in [systemd-journald](https://www.freedesktop.org/software/systemd/man/systemd-journald.service.html) by logging in to the server with SSH and running `journalctl -fu matrix-synapse-admin`. | |||
| As with all other services, you can find the logs in [systemd-journald](https://www.freedesktop.org/software/systemd/man/systemd-journald.service.html) by logging in to the server with SSH and running `journalctl -fu synapse-admin`. | |||
| If you have questions, you can join this community room and feel free to ask: [#synapse-admin:etke.cc](https://matrix.to/#/#synapse-admin:etke.cc) | |||
| @@ -26,7 +26,7 @@ Note that **not all components support self-building yet**. | |||
| Possibly outdated list of roles where self-building the Docker image is currently possible: | |||
| - `matrix-synapse` | |||
| - `matrix-synapse-admin` | |||
| - `synapse-admin` | |||
| - `matrix-client-element` | |||
| - `hydrogen` | |||
| - `cinny` | |||
| @@ -855,7 +855,7 @@ devture_systemd_service_manager_services_list_auto: | | |||
| }] if matrix_synapse_auto_compressor_enabled else []) | |||
| + | |||
| ([{ | |||
| 'name': 'matrix-synapse-admin.service', | |||
| 'name': 'synapse-admin.service', | |||
| 'priority': 4000, | |||
| 'restart_necessary': (matrix_synapse_admin_restart_necessary | bool), | |||
| 'groups': ['matrix', 'synapse-admin'], | |||
| @@ -4991,7 +4991,7 @@ matrix_synapse_reverse_proxy_companion_access_log_syslog_integration_server_port | |||
| ###################################################################### | |||
| # | |||
| # matrix-synapse-admin | |||
| # synapse-admin | |||
| # | |||
| ###################################################################### | |||
| @@ -5172,7 +5172,7 @@ matrix_synapse_admin_config_asManagedUsers_auto: | | |||
| ###################################################################### | |||
| # | |||
| # /matrix-synapse-admin | |||
| # /synapse-admin | |||
| # | |||
| ###################################################################### | |||
| @@ -10,7 +10,7 @@ | |||
| # SPDX-License-Identifier: AGPL-3.0-or-later | |||
| --- | |||
| # matrix-synapse-admin is a web UI for managing the Synapse Matrix server | |||
| # synapse-admin is a web UI for managing the Synapse Matrix server | |||
| # Project source code URL: https://github.com/Awesome-Technologies/synapse-admin | |||
| # Fork source code URL: https://github.com/etkecc/synapse-admin | |||
| @@ -36,14 +36,14 @@ matrix_synapse_admin_docker_image_registry_prefix_upstream_default: "ghcr.io/" | |||
| matrix_synapse_admin_docker_image_force_pull: "{{ matrix_synapse_admin_docker_image.endswith(':latest') }}" | |||
| # The base container network | |||
| matrix_synapse_admin_container_network: matrix-synapse-admin | |||
| matrix_synapse_admin_container_network: synapse-admin | |||
| # A list of additional container networks that the container would be connected to. | |||
| # The role does not create these networks, so make sure they already exist. | |||
| # Use this to expose this container to a reverse proxy, which runs in a different container network. | |||
| matrix_synapse_admin_container_additional_networks: [] | |||
| # Controls whether the matrix-synapse-admin container exposes its HTTP port (tcp/8080 in the container). | |||
| # Controls whether the synapse-admin container exposes its HTTP port (tcp/8080 in the container). | |||
| # | |||
| # Takes an "<ip>:<port>" or "<port>" value (e.g. "127.0.0.1:8766"), or empty string to not expose. | |||
| matrix_synapse_admin_container_http_host_bind_port: '' | |||
| @@ -94,10 +94,10 @@ matrix_synapse_admin_container_labels_traefik_additional_response_headers_custom | |||
| # another.label="here" | |||
| matrix_synapse_admin_container_labels_additional_labels: '' | |||
| # List of systemd services that matrix-synapse-admin.service depends on | |||
| # List of systemd services that synapse-admin.service depends on | |||
| matrix_synapse_admin_systemd_required_services_list: "{{ [devture_systemd_docker_base_docker_service_name] if devture_systemd_docker_base_docker_service_name else [] }}" | |||
| # List of systemd services that matrix-synapse-admin.service wants | |||
| # List of systemd services that synapse-admin.service wants | |||
| matrix_synapse_admin_systemd_wanted_services_list: [] | |||
| # Specifies the value of the `X-XSS-Protection` header | |||
| @@ -11,7 +11,7 @@ | |||
| --- | |||
| - name: Ensure matrix-synapse-admin paths exists | |||
| - name: Ensure synapse-admin paths exists | |||
| ansible.builtin.file: | |||
| path: "{{ item.path }}" | |||
| state: directory | |||
| @@ -24,7 +24,7 @@ | |||
| - {path: "{{ matrix_synapse_admin_docker_src_files_path }}", when: "{{ matrix_synapse_admin_container_image_self_build }}"} | |||
| when: "item.when | bool" | |||
| - name: Ensure matrix-synapse-admin labels file is created | |||
| - name: Ensure synapse-admin labels file is created | |||
| ansible.builtin.template: | |||
| src: "{{ role_path }}/templates/labels.j2" | |||
| dest: "{{ matrix_synapse_admin_base_path }}/labels" | |||
| @@ -33,7 +33,7 @@ | |||
| mode: 0640 | |||
| register: matrix_synapse_admin_support_files_result | |||
| - name: Ensure matrix-synapse-admin configuration installed | |||
| - name: Ensure synapse-admin configuration installed | |||
| ansible.builtin.copy: | |||
| content: "{{ matrix_synapse_admin_configuration | to_nice_json }}" | |||
| dest: "{{ matrix_synapse_admin_config_path }}/config.json" | |||
| @@ -42,7 +42,7 @@ | |||
| group: "{{ matrix_group_name }}" | |||
| register: matrix_synapse_admin_config_result | |||
| - name: Ensure matrix-synapse-admin image is pulled | |||
| - name: Ensure synapse-admin image is pulled | |||
| community.docker.docker_image: | |||
| name: "{{ matrix_synapse_admin_docker_image }}" | |||
| source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}" | |||
| @@ -54,7 +54,7 @@ | |||
| delay: "{{ devture_playbook_help_container_retries_delay }}" | |||
| until: matrix_synapse_admin_container_image_pull_result is not failed | |||
| - name: Ensure matrix-synapse-admin repository is present when self-building | |||
| - name: Ensure synapse-admin repository is present when self-building | |||
| ansible.builtin.git: | |||
| repo: "{{ matrix_synapse_admin_container_image_self_build_repo }}" | |||
| dest: "{{ matrix_synapse_admin_docker_src_files_path }}" | |||
| @@ -65,7 +65,7 @@ | |||
| register: matrix_synapse_admin_git_pull_results | |||
| when: matrix_synapse_admin_container_image_self_build | bool | |||
| - name: Ensure matrix-synapse-admin Docker image is built | |||
| - name: Ensure synapse-admin Docker image is built | |||
| community.docker.docker_image: | |||
| name: "{{ matrix_synapse_admin_docker_image }}" | |||
| source: build | |||
| @@ -77,17 +77,17 @@ | |||
| pull: true | |||
| when: matrix_synapse_admin_container_image_self_build | bool | |||
| - name: Ensure matrix-synapse-admin container network is created | |||
| - name: Ensure synapse-admin container network is created | |||
| community.general.docker_network: | |||
| enable_ipv6: "{{ devture_systemd_docker_base_ipv6_enabled }}" | |||
| name: "{{ matrix_synapse_admin_container_network }}" | |||
| driver: bridge | |||
| driver_options: "{{ devture_systemd_docker_base_container_networks_driver_options }}" | |||
| - name: Ensure matrix-synapse-admin.service installed | |||
| - name: Ensure synapse-admin.service installed | |||
| ansible.builtin.template: | |||
| src: "{{ role_path }}/templates/systemd/matrix-synapse-admin.service.j2" | |||
| dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-synapse-admin.service" | |||
| src: "{{ role_path }}/templates/systemd/synapse-admin.service.j2" | |||
| dest: "{{ devture_systemd_docker_base_systemd_path }}/synapse-admin.service" | |||
| mode: 0644 | |||
| register: matrix_synapse_admin_systemd_service_result | |||
| @@ -4,26 +4,26 @@ | |||
| --- | |||
| - name: Check existence of matrix-synapse-admin service | |||
| - name: Check existence of synapse-admin service | |||
| ansible.builtin.stat: | |||
| path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-synapse-admin.service" | |||
| path: "{{ devture_systemd_docker_base_systemd_path }}/synapse-admin.service" | |||
| register: matrix_synapse_admin_service_stat | |||
| - when: matrix_synapse_admin_service_stat.stat.exists | bool | |||
| block: | |||
| - name: Ensure matrix-synapse-admin is stopped | |||
| - name: Ensure synapse-admin is stopped | |||
| ansible.builtin.service: | |||
| name: matrix-synapse-admin | |||
| name: synapse-admin | |||
| state: stopped | |||
| enabled: false | |||
| daemon_reload: true | |||
| - name: Ensure matrix-synapse-admin.service doesn't exist | |||
| - name: Ensure synapse-admin.service doesn't exist | |||
| ansible.builtin.file: | |||
| path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-synapse-admin.service" | |||
| path: "{{ devture_systemd_docker_base_systemd_path }}/synapse-admin.service" | |||
| state: absent | |||
| - name: Ensure matrix-synapse-admin directory doesn't exist | |||
| - name: Ensure synapse-admin directory doesn't exist | |||
| ansible.builtin.file: | |||
| path: "{{ matrix_synapse_admin_base_path }}" | |||
| state: absent | |||
| @@ -6,7 +6,7 @@ | |||
| --- | |||
| - name: (Deprecation) Catch and report renamed matrix-synapse-admin settings | |||
| - name: (Deprecation) Catch and report renamed synapse-admin settings | |||
| ansible.builtin.fail: | |||
| msg: >- | |||
| Your configuration contains a variable, which now has a different name. | |||
| @@ -22,7 +22,7 @@ | |||
| - when: matrix_synapse_admin_container_labels_traefik_enabled | bool | |||
| block: | |||
| - name: Fail if required matrix-synapse-admin Traefik settings not defined | |||
| - name: Fail if required synapse-admin Traefik settings not defined | |||
| ansible.builtin.fail: | |||
| msg: >- | |||
| You need to define a required configuration setting (`{{ item }}`). | |||
| @@ -12,45 +12,45 @@ traefik.enable=true | |||
| traefik.docker.network={{ matrix_synapse_admin_container_labels_traefik_docker_network }} | |||
| {% endif %} | |||
| traefik.http.services.matrix-synapse-admin.loadbalancer.server.port=8080 | |||
| traefik.http.services.synapse-admin.loadbalancer.server.port=8080 | |||
| {% set middlewares = [] %} | |||
| {% if matrix_synapse_admin_container_labels_traefik_ipallowlist_sourcerange | length > 0 %} | |||
| traefik.http.middlewares.matrix-synapse-admin-ipallowlist.ipallowlist.sourcerange={{ matrix_synapse_admin_container_labels_traefik_ipallowlist_sourcerange | join(',') }} | |||
| {% set middlewares = middlewares + ['matrix-synapse-admin-ipallowlist'] %} | |||
| traefik.http.middlewares.synapse-admin-ipallowlist.ipallowlist.sourcerange={{ matrix_synapse_admin_container_labels_traefik_ipallowlist_sourcerange | join(',') }} | |||
| {% set middlewares = middlewares + ['synapse-admin-ipallowlist'] %} | |||
| {% endif %} | |||
| {% if matrix_synapse_admin_container_labels_traefik_path_prefix != '/' %} | |||
| traefik.http.middlewares.matrix-synapse-admin-slashless-redirect.redirectregex.regex=({{ matrix_synapse_admin_container_labels_traefik_path_prefix | quote }})$ | |||
| traefik.http.middlewares.matrix-synapse-admin-slashless-redirect.redirectregex.replacement=${1}/ | |||
| {% set middlewares = middlewares + ['matrix-synapse-admin-slashless-redirect'] %} | |||
| traefik.http.middlewares.synapse-admin-slashless-redirect.redirectregex.regex=({{ matrix_synapse_admin_container_labels_traefik_path_prefix | quote }})$ | |||
| traefik.http.middlewares.synapse-admin-slashless-redirect.redirectregex.replacement=${1}/ | |||
| {% set middlewares = middlewares + ['synapse-admin-slashless-redirect'] %} | |||
| {% endif %} | |||
| {% if matrix_synapse_admin_container_labels_traefik_path_prefix != '/' %} | |||
| traefik.http.middlewares.matrix-synapse-admin-strip-prefix.stripprefix.prefixes={{ matrix_synapse_admin_container_labels_traefik_path_prefix }} | |||
| {% set middlewares = middlewares + ['matrix-synapse-admin-strip-prefix'] %} | |||
| traefik.http.middlewares.synapse-admin-strip-prefix.stripprefix.prefixes={{ matrix_synapse_admin_container_labels_traefik_path_prefix }} | |||
| {% set middlewares = middlewares + ['synapse-admin-strip-prefix'] %} | |||
| {% endif %} | |||
| {% if matrix_synapse_admin_container_labels_traefik_additional_response_headers.keys() | length > 0 %} | |||
| {% for name, value in matrix_synapse_admin_container_labels_traefik_additional_response_headers.items() %} | |||
| traefik.http.middlewares.matrix-synapse-admin-add-headers.headers.customresponseheaders.{{ name }}={{ value }} | |||
| traefik.http.middlewares.synapse-admin-add-headers.headers.customresponseheaders.{{ name }}={{ value }} | |||
| {% endfor %} | |||
| {% set middlewares = middlewares + ['matrix-synapse-admin-add-headers'] %} | |||
| {% set middlewares = middlewares + ['synapse-admin-add-headers'] %} | |||
| {% endif %} | |||
| traefik.http.routers.matrix-synapse-admin.rule={{ matrix_synapse_admin_container_labels_traefik_rule }} | |||
| traefik.http.routers.synapse-admin.rule={{ matrix_synapse_admin_container_labels_traefik_rule }} | |||
| {% if matrix_synapse_admin_container_labels_traefik_priority | int > 0 %} | |||
| traefik.http.routers.matrix-synapse-admin.priority={{ matrix_synapse_admin_container_labels_traefik_priority }} | |||
| traefik.http.routers.synapse-admin.priority={{ matrix_synapse_admin_container_labels_traefik_priority }} | |||
| {% endif %} | |||
| {% if middlewares | length > 0 %} | |||
| traefik.http.routers.matrix-synapse-admin.middlewares={{ middlewares | join(',') }} | |||
| traefik.http.routers.synapse-admin.middlewares={{ middlewares | join(',') }} | |||
| {% endif %} | |||
| traefik.http.routers.matrix-synapse-admin.service=matrix-synapse-admin | |||
| traefik.http.routers.matrix-synapse-admin.entrypoints={{ matrix_synapse_admin_container_labels_traefik_entrypoints }} | |||
| traefik.http.routers.matrix-synapse-admin.tls={{ matrix_synapse_admin_container_labels_traefik_tls | to_json }} | |||
| traefik.http.routers.synapse-admin.service=synapse-admin | |||
| traefik.http.routers.synapse-admin.entrypoints={{ matrix_synapse_admin_container_labels_traefik_entrypoints }} | |||
| traefik.http.routers.synapse-admin.tls={{ matrix_synapse_admin_container_labels_traefik_tls | to_json }} | |||
| {% if matrix_synapse_admin_container_labels_traefik_tls %} | |||
| traefik.http.routers.matrix-synapse-admin.tls.certResolver={{ matrix_synapse_admin_container_labels_traefik_tls_certResolver }} | |||
| traefik.http.routers.synapse-admin.tls.certResolver={{ matrix_synapse_admin_container_labels_traefik_tls_certResolver }} | |||
| {% endif %} | |||
| {% endif %} | |||
| @@ -1,6 +1,6 @@ | |||
| #jinja2: lstrip_blocks: True | |||
| [Unit] | |||
| Description=matrix-synapse-admin | |||
| Description=synapse-admin | |||
| {% for service in matrix_synapse_admin_systemd_required_services_list %} | |||
| Requires={{ service }} | |||
| After={{ service }} | |||
| @@ -13,12 +13,12 @@ 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-synapse-admin 2>/dev/null || true' | |||
| ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-synapse-admin 2>/dev/null || true' | |||
| 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 }} synapse-admin 2>/dev/null || true' | |||
| ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm synapse-admin 2>/dev/null || true' | |||
| ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \ | |||
| --rm \ | |||
| --name=matrix-synapse-admin \ | |||
| --name=synapse-admin \ | |||
| --log-driver=none \ | |||
| --cap-drop=ALL \ | |||
| --read-only \ | |||
| @@ -35,17 +35,17 @@ ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \ | |||
| {{ matrix_synapse_admin_docker_image }} | |||
| {% for network in matrix_synapse_admin_container_additional_networks %} | |||
| ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} network connect {{ network }} matrix-synapse-admin | |||
| ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} network connect {{ network }} synapse-admin | |||
| {% endfor %} | |||
| ExecStart={{ devture_systemd_docker_base_host_command_docker }} start --attach matrix-synapse-admin | |||
| ExecStart={{ devture_systemd_docker_base_host_command_docker }} start --attach synapse-admin | |||
| 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-synapse-admin 2>/dev/null || true' | |||
| ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-synapse-admin 2>/dev/null || true' | |||
| 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 }} synapse-admin 2>/dev/null || true' | |||
| ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm synapse-admin 2>/dev/null || true' | |||
| Restart=always | |||
| RestartSec=30 | |||
| SyslogIdentifier=matrix-synapse-admin | |||
| SyslogIdentifier=synapse-admin | |||
| [Install] | |||
| WantedBy=multi-user.target | |||