Implemented draft for top domain as matrix identifier name

This commit is contained in:
Kevin Veen-Birkenbach 2024-01-19 11:52:08 +01:00
parent 849ed61d38
commit 0aebca62f6
9 changed files with 48 additions and 22 deletions

View File

@ -108,6 +108,8 @@ nginx_configuration_directory: "/etc/nginx/conf.d/"
nginx_servers_directory: "{{nginx_configuration_directory}}servers/" # Contains server blogs
nginx_maps_directory: "{{nginx_configuration_directory}}maps/" # Contains mappins
nginx_upstreams_directory: "{{nginx_configuration_directory}}upstreams/" # Contains upstream configurations
nginx_well_known_root: "/usr/share/nginx/well-known/" # Path where well-known files are stored
nginx_homepage_root: "/usr/share/nginx/homepage/" # Path where the static homepage files are stored
## Docker Applications

View File

@ -8,7 +8,18 @@
domain: "{{synapse_domain}}"
http_port: "{{synapse_http_port}}"
- name: configure {{synapse_domain}}.conf
- name: create {{well_known_directory}}
file:
path: "{{well_known_directory}}"
state: directory
mode: '0755'
- name: create {{well_known_directory}}server
template:
src: "well-known.j2"
dest: "{{well_known_directory}}server"
- name: create {{synapse_domain}}.conf
template:
src: "templates/nginx.conf.j2"
dest: "{{nginx_servers_directory}}{{synapse_domain}}.conf"
@ -16,12 +27,6 @@
domain: "{{synapse_domain}}"
http_port: "{{synapse_http_port}}"
notify: restart nginx
#- name: "include tasks nginx-docker-proxy-domain.yml"
# include_tasks: nginx-docker-proxy-domain.yml
# vars:
# domain: "{{synapse_domain}}"
# http_port: "{{synapse_http_port}}"
- name: "include tasks nginx-docker-proxy-domain.yml for element"
include_tasks: nginx-docker-proxy-domain.yml
@ -32,9 +37,9 @@
- name: include create-and-seed-database.yml for multiple bridges
include_tasks: create-and-seed-database.yml
vars:
database_password: "{{ item.database_password }}"
database_username: "{{ item.database_username }}"
database_name: "{{ item.database_name }}"
database_password: "{{ item.database_password }}"
database_username: "{{ item.database_username }}"
database_name: "{{ item.database_name }}"
loop: "{{ bridges }}"
# The following taks are necessary because a clean setup is necessary

View File

@ -1,4 +1,4 @@
server_name: "{{domain_matrix_synapse}}"
server_name: "{{top_domain}}"
pid_file: /data/homeserver.pid
listeners:
- port: 8008

View File

@ -0,0 +1,3 @@
{
"m.server": "{{synapse_domain}}:443"
}

View File

@ -3,6 +3,7 @@ docker_compose_project_name: "matrix"
database_password: "{{matrix_database_password}}"
database_type: "postgres"
registration_file_folder: "/data/registration/"
well_known_directory: "{{nginx_well_known_root}}/matrix/"
bridges:
- database_password: "{{ mautrix_whatsapp_bridge_database_password }}"

View File

@ -1,13 +1,4 @@
---
- name: "include task certbot-matomo.yml"
include_tasks: certbot-matomo.yml
- name: configure {{domain}}.conf
template:
src: "homepage.nginx.conf.j2"
dest: "{{nginx_servers_directory}}{{domain}}.conf"
notify: restart nginx
- name: "pull homepage from {{nginx_homepage_repository_address}}"
git:
repo: "{{nginx_homepage_repository_address}}"

View File

@ -1 +0,0 @@
nginx_homepage_root: /usr/share/nginx/homepage

View File

@ -23,7 +23,25 @@
when: run_once_nginx is not defined
- name: create nginx config file
template: src=nginx.conf.j2 dest=/etc/nginx/nginx.conf
template:
src: nginx.conf.j2
dest: /etc/nginx/nginx.conf
notify: restart nginx
when: run_once_nginx is not defined
- name: "include task certbot-matomo.yml"
include_tasks: certbot-matomo.yml
when: run_once_nginx is not defined
vars:
domain: "{{top_domain}}"
when: run_once_nginx is not defined
- name: configure {{top_domain}}.conf
template:
src: "homepage.nginx.conf.j2"
dest: "{{nginx_servers_directory}}{{top_domain}}.conf"
vars:
domain: "{{top_domain}}"
notify: restart nginx
when: run_once_nginx is not defined

View File

@ -16,4 +16,11 @@ server
root {{nginx_homepage_root}};
index index.html index.htm;
}
location /.well-known/ {
alias {{nginx_well_known_root}};
allow all;
default_type "text/plain";
autoindex on;
}
}