Johan Swetzén пре 3 година
родитељ
комит
41d8776016
5 измењених фајлова са 19 додато и 16 уклоњено
  1. +1
    -1
      roles/matrix-bridge-mautrix-wsproxy/defaults/main.yml
  2. +12
    -9
      roles/matrix-bridge-mautrix-wsproxy/tasks/init.yml
  3. +1
    -1
      roles/matrix-bridge-mautrix-wsproxy/tasks/setup_install.yml
  4. +3
    -3
      roles/matrix-bridge-mautrix-wsproxy/templates/systemd/matrix-mautrix-wsproxy-syncproxy.service.j2
  5. +2
    -2
      roles/matrix-nginx-proxy/templates/nginx/conf.d/matrix-mautrix-wsproxy.conf.j2

+ 1
- 1
roles/matrix-bridge-mautrix-wsproxy/defaults/main.yml Прегледај датотеку

@@ -99,4 +99,4 @@ matrix_mautrix_wsproxy_syncproxy_database_hostname: 'matrix-postgres'
matrix_mautrix_wsproxy_syncproxy_database_port: 5432
matrix_mautrix_wsproxy_syncproxy_database_name: 'matrix_mautrix_wsproxy_syncproxy'

matrix_mautrix_signal_wsproxy_syncproxy_connection_string: 'postgres://{{ matrix_mautrix_wsproxy_syncproxy_database_username }}:{{ matrix_mautrix_wsproxy_syncproxy_database_password }}@{{ matrix_mautrix_wsproxy_syncproxy_database_hostname }}:{{ matrix_mautrix_wsproxy_syncproxy_database_port }}/{{ matrix_mautrix_wsproxy_syncproxy_database_name }}'
matrix_mautrix_signal_wsproxy_syncproxy_connection_string: 'postgres://{{ matrix_mautrix_wsproxy_syncproxy_database_username }}:{{ matrix_mautrix_wsproxy_syncproxy_database_password }}@{{ matrix_mautrix_wsproxy_syncproxy_database_hostname }}:{{ matrix_mautrix_wsproxy_syncproxy_database_port }}/{{ matrix_mautrix_wsproxy_syncproxy_database_name }}'

+ 12
- 9
roles/matrix-bridge-mautrix-wsproxy/tasks/init.yml Прегледај датотеку

@@ -6,17 +6,20 @@
# If the matrix-synapse role is not used, these variables may not exist.
- ansible.builtin.set_fact:
matrix_synapse_container_extra_arguments: >
{{ matrix_synapse_container_extra_arguments|default([]) }}
+
["--mount type=bind,src={{ matrix_mautrix_wsproxy_config_path }}/registration.yaml,dst=/matrix-mautrix-wsproxy-registration.yaml,ro"]
{{
matrix_synapse_container_extra_arguments | default([])
+
["--mount type=bind,src={{ matrix_mautrix_wsproxy_config_path }}/registration.yaml,dst=/matrix-mautrix-wsproxy-registration.yaml,ro"]
}}

matrix_synapse_app_service_config_files: >
{{ matrix_synapse_app_service_config_files|default([]) }}
+
{{ ["/matrix-mautrix-wsproxy-registration.yaml"] }}
{{
matrix_synapse_app_service_config_files | default([])
+
["/matrix-mautrix-wsproxy-registration.yaml"]
}}
when: matrix_mautrix_wsproxy_enabled|bool


- block:
- name: Fail if matrix-nginx-proxy role already executed
ansible.builtin.fail:
@@ -34,11 +37,11 @@
{% if matrix_nginx_proxy_enabled|default(False) %}
{# Use the embedded DNS resolver in Docker containers to discover the service #}
resolver 127.0.0.11 valid=5s;
set $backend "matrix-mautrix-wsproxy:{{ matrix_mautrix_wsproxy_port }}";
set $backend "matrix-mautrix-wsproxy:29331";
proxy_pass http://$backend;
{% else %}
{# Generic configuration for use outside of our container setup #}
proxy_pass http://127.0.0.1:{{ matrix_mautrix_wsproxy_port }};
proxy_pass http://127.0.0.1:29331;
{% endif %}
}



+ 1
- 1
roles/matrix-bridge-mautrix-wsproxy/tasks/setup_install.yml Прегледај датотеку

@@ -82,7 +82,7 @@
- name: Ensure matrix-mautrix-wsproxy-syncproxy.service installed
ansible.builtin.template:
src: "{{ role_path }}/templates/systemd/matrix-mautrix-wsproxy-syncproxy.service.j2"
dest: "{{ matrix_systemd_path }}/matrix-mautrix-wsproxy.service"
dest: "{{ matrix_systemd_path }}/matrix-mautrix-wsproxy-syncproxy.service"
mode: 0644
register: matrix_mautrix_wsproxy_syncproxy_systemd_service_result



+ 3
- 3
roles/matrix-bridge-mautrix-wsproxy/templates/systemd/matrix-mautrix-wsproxy-syncproxy.service.j2 Прегледај датотеку

@@ -25,9 +25,9 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-mautrix-wsprox
--cap-drop=ALL \
--network={{ matrix_docker_network }} \
-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 }}
-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 }} \
{% for arg in matrix_mautrix_wsproxy_syncproxy_container_extra_arguments %}
{{ arg }} \
{% endfor %}


+ 2
- 2
roles/matrix-nginx-proxy/templates/nginx/conf.d/matrix-mautrix-wsproxy.conf.j2 Прегледај датотеку

@@ -26,11 +26,11 @@
{% if matrix_nginx_proxy_enabled %}
{# Use the embedded DNS resolver in Docker containers to discover the service #}
resolver 127.0.0.11 valid=5s;
set $backend "wsproxy:{{ matrix_mautrix_wsproxy_port }}";
set $backend "wsproxy:29331";
proxy_pass http://$backend;
{% else %}
{# Generic configuration for use outside of our container setup #}
proxy_pass http://127.0.0.1:{{ matrix_mautrix_wsproxy_port }};
proxy_pass http://127.0.0.1:29331;
{% endif %}

proxy_set_header Host $host;


Loading…
Откажи
Сачувај