From 6b023d09d4c3e863934ca44dbbe333beecfd99a7 Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Wed, 19 Jun 2019 09:21:13 +0300 Subject: [PATCH] Use container network address for communication between IRC bridge and homeserver This means we need to explicitly specify a `media_url` now, because without it, `url` would be used for building public URLs to files/images. That doesn't work when `url` is not a public URL. --- roles/matrix-bridge-appservice-irc/defaults/main.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/roles/matrix-bridge-appservice-irc/defaults/main.yml b/roles/matrix-bridge-appservice-irc/defaults/main.yml index 9f05fc4e3..d4177a4a6 100644 --- a/roles/matrix-bridge-appservice-irc/defaults/main.yml +++ b/roles/matrix-bridge-appservice-irc/defaults/main.yml @@ -8,6 +8,10 @@ matrix_appservice_irc_docker_image_force_pull: "{{ matrix_appservice_irc_docker_ matrix_appservice_irc_base_path: "{{ matrix_base_data_path }}/appservice-irc" +matrix_appservice_irc_homeserver_url: 'http://matrix-synapse:8008' +matrix_appservice_irc_homeserver_media_url: 'https://{{ matrix_server_fqn_matrix }}' +matrix_appservice_irc_homeserver_domain: '{{ matrix_domain }}' + # Controls whether the matrix-appservice-discord container exposes its HTTP port (tcp/9999 in the container). # # Takes an ":" or "" value (e.g. "127.0.0.1:9999"), or empty string to not expose. @@ -25,8 +29,9 @@ matrix_appservice_irc_systemd_wanted_services_list: [] matrix_appservice_irc_configuration_yaml: | #jinja2: lstrip_blocks: True homeserver: - url: "https://{{ matrix_server_fqn_matrix }}" - domain: "{{ matrix_domain }}" + url: {{ matrix_appservice_irc_homeserver_url }} + media_url: {{ matrix_appservice_irc_homeserver_media_url }} + domain: {{ matrix_appservice_irc_homeserver_domain }} enablePresence: true matrix_appservice_irc_configuration_extension_yaml: |