Solved docker variable bug

This commit is contained in:
Kevin Veen-Birkenbach 2025-02-03 17:24:18 +01:00
parent 8e2c8360d4
commit ccc87ad24b
2 changed files with 5 additions and 2 deletions

View File

@ -24,7 +24,7 @@
src: "templates/nginx.conf.j2"
dest: "{{nginx.directories.http.servers}}{{domains.matrix_synapse}}.conf"
vars:
domain: "{{domains.matrix_synapse}}"
# domain: "{{domains.matrix_synapse}}" 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_ports.matrix_synapse}}"
notify: restart nginx

View File

@ -1,5 +1,8 @@
server {
server_name {{domains.matrix_synapse}};
# Somehow .j2 doesn't interpretate the passed variable right. For this reasons this redeclaration is necessary
{% set domain = domains.matrix_synapse %}
server_name {{domain}};
{% include 'roles/letsencrypt/templates/ssl_header.j2' %}
# For the federation port