Solved matrix federation port bug

This commit is contained in:
Kevin Veen-Birkenbach 2025-08-15 18:37:18 +02:00
parent 012426cf3b
commit 85a2f4b3d2
No known key found for this signature in database
GPG Key ID: 44D8F11FD62F878E
3 changed files with 3 additions and 8 deletions

View File

@ -28,6 +28,6 @@
src: "templates/nginx.conf.j2" src: "templates/nginx.conf.j2"
dest: "{{ NGINX.DIRECTORIES.HTTP.SERVERS }}{{ MATRIX_SYNAPSE_DOMAIN }}.conf" dest: "{{ NGINX.DIRECTORIES.HTTP.SERVERS }}{{ MATRIX_SYNAPSE_DOMAIN }}.conf"
vars: vars:
domain: "{{ MATRIX_SYNAPSE_DOMAIN }}" # Didn't work in the past. May it works now. This does not seem to work @todo Check how to solve without declaring set_fact, seems a bug at templates domain: "{{ MATRIX_SYNAPSE_DOMAIN }}"
http_port: "{{ MATRIX_SYNAPSE_PORT }}" http_port: "{{ MATRIX_SYNAPSE_PORT }}"
notify: restart openresty notify: restart openresty

View File

@ -1,10 +1,4 @@
server { server {
{# Somehow .j2 doesn't interpretate the passed variable right. For this reasons this redeclaration is necessary #}
{# Could be that this is related to the set_fact use #}
{% set domain = MATRIX_SYNAPSE_DOMAIN | mandatory("MATRIX_SYNAPSE_DOMAIN is required") %}
{% set http_port = MATRIX_SYNAPSE_PORT | mandatory("MATRIX_PORT is required") %}
{% set FEDERATION_PORT = http_port %}
server_name {{ domain }}; server_name {{ domain }};
{% include 'roles/srv-web-7-7-letsencrypt/templates/ssl_header.j2' %} {% include 'roles/srv-web-7-7-letsencrypt/templates/ssl_header.j2' %}
@ -17,4 +11,4 @@ server {
{% include 'roles/srv-proxy-7-4-core/templates/location/html.conf.j2' %} {% include 'roles/srv-proxy-7-4-core/templates/location/html.conf.j2' %}
{% include 'roles/srv-proxy-7-4-core/templates/location/upload.conf.j2' %} {% include 'roles/srv-proxy-7-4-core/templates/location/upload.conf.j2' %}
} }

View File

@ -17,6 +17,7 @@ MATRIX_WELL_KNOWN_FILE: "{{ MATRIX_WELL_KNOWN_DIRECTORY }}server"
MATRIX_PROJECT: "{{ application_id | get_entity_name }}" MATRIX_PROJECT: "{{ application_id | get_entity_name }}"
MATRIX_REGISTRATION_FILE_FOLDER: "/data/" MATRIX_REGISTRATION_FILE_FOLDER: "/data/"
MATRIX_REGISTRATION_SHARED_SECRET: "{{ applications | get_app_conf(application_id, 'credentials.registration_shared_secret') }}" MATRIX_REGISTRATION_SHARED_SECRET: "{{ applications | get_app_conf(application_id, 'credentials.registration_shared_secret') }}"
FEDERATION_PORT: "{{ ports.public.federation['web-app-matrix_synapse'] }}"
## Synapse ## Synapse
MATRIX_SYNAPSE_VERSION: "{{ applications | get_app_conf(application_id, 'docker.services.synapse.version') }}" MATRIX_SYNAPSE_VERSION: "{{ applications | get_app_conf(application_id, 'docker.services.synapse.version') }}"