Optimized matrix domain mapping

This commit is contained in:
2025-05-17 11:53:49 +02:00
parent a3d5bb3277
commit ca5c3c6e8a
17 changed files with 38 additions and 37 deletions

View File

@@ -16,7 +16,7 @@
include_role:
name: nginx-https-get-cert-modify-all
vars:
domain: "{{domains.synapse}}"
domain: "{{domains.matrix.synapse}}"
http_port: "{{ports.localhost.http.synapse}}"
- name: create {{well_known_directory}}
@@ -30,12 +30,12 @@
src: "well-known.j2"
dest: "{{well_known_directory}}server"
- name: create {{domains.synapse}}.conf
- name: create {{domains.matrix.synapse}}.conf
template:
src: "templates/nginx.conf.j2"
dest: "{{nginx.directories.http.servers}}{{domains.synapse}}.conf"
dest: "{{nginx.directories.http.servers}}{{domains.matrix.synapse}}.conf"
vars:
domain: "{{domains.synapse}}" # 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: "{{domains.matrix.synapse}}" # 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
http_port: "{{ports.localhost.http.synapse}}"
notify: restart nginx
@@ -43,7 +43,7 @@
include_role:
name: nginx-domain-setup
vars:
domain: "{{domains.element}}"
domain: "{{domains.matrix.element}}"
http_port: "{{ports.localhost.http.element}}"
- name: include create-and-seed-database.yml for multiple bridges
@@ -94,13 +94,13 @@
- name: add synapse log configuration
template:
src: "synapse/log.config.j2"
dest: "{{docker_compose.directories.instance}}{{domains.synapse}}.log.config"
dest: "{{docker_compose.directories.instance}}{{domains.matrix.synapse}}.log.config"
notify: docker compose project setup
# https://github.com/matrix-org/synapse/issues/6303
- name: set correct folder permissions
command:
cmd: "docker run --rm --mount type=volume,src=matrix_synapse_data,dst=/data -e SYNAPSE_SERVER_NAME={{domains.synapse}} -e SYNAPSE_REPORT_STATS=no --entrypoint /bin/sh matrixdotorg/synapse:latest -c 'chown -vR 991:991 /data'"
cmd: "docker run --rm --mount type=volume,src=matrix_synapse_data,dst=/data -e SYNAPSE_SERVER_NAME={{domains.matrix.synapse}} -e SYNAPSE_REPORT_STATS=no --entrypoint /bin/sh matrixdotorg/synapse:latest -c 'chown -vR 991:991 /data'"
- name: add docker-compose.yml
template: