diff --git a/roles/matrix-bridge-mautrix-wsproxy/defaults/main.yml b/roles/matrix-bridge-mautrix-wsproxy/defaults/main.yml index 3a3b70bcd..1bddcae44 100644 --- a/roles/matrix-bridge-mautrix-wsproxy/defaults/main.yml +++ b/roles/matrix-bridge-mautrix-wsproxy/defaults/main.yml @@ -10,6 +10,7 @@ matrix_mautrix_wsproxy_docker_image_force_pull: "{{ matrix_mautrix_wsproxy_docke matrix_mautrix_wsproxy_base_path: "{{ matrix_base_data_path }}/mautrix-wsproxy" matrix_mautrix_wsproxy_config_path: "{{ matrix_mautrix_wsproxy_base_path }}/config" +matrix_mautrix_wsproxy_data_path: "{{ matrix_mautrix_wsproxy_base_path }}/data" matrix_mautrix_wsproxy_homeserver_address: "{{ matrix_homeserver_container_url }}" matrix_mautrix_wsproxy_homeserver_domain: "{{ matrix_domain }}" diff --git a/roles/matrix-bridge-mautrix-wsproxy/tasks/setup_install.yml b/roles/matrix-bridge-mautrix-wsproxy/tasks/setup_install.yml index c1488b75d..3e4069ab8 100644 --- a/roles/matrix-bridge-mautrix-wsproxy/tasks/setup_install.yml +++ b/roles/matrix-bridge-mautrix-wsproxy/tasks/setup_install.yml @@ -28,6 +28,7 @@ with_items: - "{{ matrix_mautrix_wsproxy_base_path }}" - "{{ matrix_mautrix_wsproxy_config_path }}" + - "{{ matrix_mautrix_wsproxy_data_path }}" - name: Check if an old matrix state file exists stat: diff --git a/roles/matrix-bridge-mautrix-wsproxy/templates/systemd/matrix-mautrix-wsproxy.service.j2 b/roles/matrix-bridge-mautrix-wsproxy/templates/systemd/matrix-mautrix-wsproxy.service.j2 index b1b376acf..6c3aa5aa0 100644 --- a/roles/matrix-bridge-mautrix-wsproxy/templates/systemd/matrix-mautrix-wsproxy.service.j2 +++ b/roles/matrix-bridge-mautrix-wsproxy/templates/systemd/matrix-mautrix-wsproxy.service.j2 @@ -25,11 +25,14 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-mautrix-wsprox --cap-drop=ALL \ --network={{ matrix_docker_network }} \ -v {{ matrix_mautrix_wsproxy_config_path }}:/config:z \ + -v {{ matrix_mautrix_wsproxy_data_path }}:/data:z \ + -e AS_TOKEN='{{ matrix_mautrix_wsproxy_appservice_token }}' \ + -e HS_TOKEN='{{ matrix_mautrix_wsproxy_homeserver_token }}' \ {% for arg in matrix_mautrix_wsproxy_container_extra_arguments %} {{ arg }} \ {% endfor %} {{ matrix_mautrix_wsproxy_docker_image }} \ - /usr/bin/mautrix-wsproxy -c /config/config.yaml -r /config/registration.yaml + /usr/bin/mautrix-wsproxy -config /config/config.yaml ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-mautrix-wsproxy 2>/dev/null' ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mautrix-wsproxy 2>/dev/null'