Browse Source

Fix comments for documentation, volumes and ports

pull/2261/head
Johan Swetzén 2 years ago
parent
commit
0a271b08fd
5 changed files with 23 additions and 9 deletions
  1. +5
    -5
      docs/configuring-playbook-bridge-mautrix-wsproxy.md
  2. +9
    -0
      roles/custom/matrix-bridge-mautrix-wsproxy/tasks/setup_install.yml
  3. +3
    -0
      roles/custom/matrix-bridge-mautrix-wsproxy/templates/syncproxy-env.j2
  4. +3
    -3
      roles/custom/matrix-bridge-mautrix-wsproxy/templates/systemd/matrix-mautrix-wsproxy-syncproxy.service.j2
  5. +3
    -1
      roles/custom/matrix-bridge-mautrix-wsproxy/templates/systemd/matrix-mautrix-wsproxy.service.j2

+ 5
- 5
docs/configuring-playbook-bridge-mautrix-wsproxy.md View File

@@ -8,11 +8,11 @@ Use the following playbook configuration:

```yaml
matrix_mautrix_wsproxy_enabled: true
matrix_mautrix_androidsms_appservice_token: 'random string'
matrix_mautrix_androidsms_homeserver_token: 'random string'
matrix_mautrix_imessage_appservice_token: 'random string'
matrix_mautrix_imessage_homeserver_token: 'random string'
matrix_mautrix_wsproxy_syncproxy_shared_secret: 'random string'
matrix_mautrix_androidsms_appservice_token: 'secret token from bridge'
matrix_mautrix_androidsms_homeserver_token: 'secret token from bridge'
matrix_mautrix_imessage_appservice_token: 'secret token from bridge'
matrix_mautrix_imessage_homeserver_token: 'secret token from bridge'
matrix_mautrix_wsproxy_syncproxy_shared_secret: 'secret token from bridge'
```

Note that the tokens must match what is compiled into the `mautrix-imessage` bridge running on Mac and Android.


+ 9
- 0
roles/custom/matrix-bridge-mautrix-wsproxy/tasks/setup_install.yml View File

@@ -14,6 +14,15 @@
- ansible.builtin.set_fact:
matrix_mautrix_wsproxy_syncproxy_requires_restart: false

- name: Ensure Mautrix wsproxy support files installed
ansible.builtin.template:
src: "{{ role_path }}/templates/{{ item }}.j2"
dest: "{{ matrix_mautrix_wsproxy_base_path }}/{{ item }}"
mode: 0640
owner: "{{ matrix_user_username }}"
group: "{{ matrix_user_groupname }}"
with_items:
- syncproxy-env
- name: Ensure Mautrix wsproxy image is pulled
community.docker.docker_image:
name: "{{ matrix_mautrix_wsproxy_docker_image }}"


+ 3
- 0
roles/custom/matrix-bridge-mautrix-wsproxy/templates/syncproxy-env.j2 View File

@@ -0,0 +1,3 @@
DATABASE_URL={{ matrix_mautrix_signal_wsproxy_syncproxy_connection_string }}
HOMESERVER_URL={{ matrix_homeserver_container_url }}
SHARED_SECRET={{ matrix_mautrix_wsproxy_syncproxy_shared_secret }}

+ 3
- 3
roles/custom/matrix-bridge-mautrix-wsproxy/templates/systemd/matrix-mautrix-wsproxy-syncproxy.service.j2 View File

@@ -24,10 +24,10 @@ ExecStart={{ devture_systemd_docker_base_host_command_docker }} run --rm --name
--user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
--cap-drop=ALL \
--network={{ matrix_docker_network }} \
{% if matrix_mautrix_wsproxy_syncproxy_bind_port %}
-p {{ matrix_mautrix_wsproxy_syncproxy_port }}:29331 \
-e DATABASE_URL={{ matrix_mautrix_signal_wsproxy_syncproxy_connection_string }} \
-e HOMESERVER_URL={{ matrix_homeserver_container_url }} \
-e SHARED_SECRET={{ matrix_mautrix_wsproxy_syncproxy_shared_secret }} \
{% endif %}
--env-file={{ matrix_mautrix_wsproxy_base_path }}/syncproxy-env \
{% for arg in matrix_mautrix_wsproxy_syncproxy_container_extra_arguments %}
{{ arg }} \
{% endfor %}


+ 3
- 1
roles/custom/matrix-bridge-mautrix-wsproxy/templates/systemd/matrix-mautrix-wsproxy.service.j2 View File

@@ -24,8 +24,10 @@ ExecStart={{ devture_systemd_docker_base_host_command_docker }} run --rm --name
--user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
--cap-drop=ALL \
--network={{ matrix_docker_network }} \
-v {{ matrix_mautrix_wsproxy_config_path }}:/data:z \
{% if matrix_mautrix_wsproxy_bind_port %}
-p {{ matrix_mautrix_wsproxy_port }}:29331 \
{% endif %}
--mount type=bind,src={{ matrix_mautrix_wsproxy_config_path }},dst=/data:z \
{% for arg in matrix_mautrix_wsproxy_container_extra_arguments %}
{{ arg }} \
{% endfor %}


Loading…
Cancel
Save