Merge pull request #1224 from GoMatrixHosting/master

GoMatrixHosting v0.5.7
This commit is contained in:
Slavi Pantaleev 2021-08-15 08:45:56 +03:00 committed by GitHub
commit f5a2d732ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 11 additions and 11 deletions

View File

@ -41,6 +41,8 @@ matrix_awx_enabled: false
matrix_nginx_proxy_data_path: "{{ '/chroot/website' if (matrix_awx_enabled and not matrix_nginx_proxy_base_domain_homepage_enabled) else (matrix_nginx_proxy_base_path + '/data') }}"
matrix_nginx_proxy_data_path_in_container: "{{ '/nginx-data/matrix-domain' if (matrix_awx_enabled and not matrix_nginx_proxy_base_domain_homepage_enabled) else '/nginx-data' }}"
matrix_nginx_proxy_data_path_extension: "{{ '' if (matrix_awx_enabled and not matrix_nginx_proxy_base_domain_homepage_enabled) else '/matrix-domain' }}"
matrix_nginx_proxy_base_domain_create_directory: "{{ not matrix_awx_enabled }}"
######################################################################
#

View File

@ -176,7 +176,7 @@
state: directory
owner: matrix
group: matrix
mode: '0574'
mode: '0770'
when: customise_base_domain_website is defined
- name: Ensure /chroot/export location exists

View File

@ -60,11 +60,5 @@
state: directory
owner: matrix
group: matrix
mode: '0574'
when: customise_base_domain_website is defined
- name: Ensure erroneous /chroot/website/matrix-domain location doesn't exist
file:
path: /chroot/website/matrix-domain
state: absent
mode: '0770'
when: customise_base_domain_website is defined

View File

@ -10,6 +10,7 @@ matrix_nginx_proxy_docker_image_force_pull: "{{ matrix_nginx_proxy_docker_image.
matrix_nginx_proxy_base_path: "{{ matrix_base_data_path }}/nginx-proxy"
matrix_nginx_proxy_data_path: "{{ matrix_nginx_proxy_base_path }}/data"
matrix_nginx_proxy_data_path_in_container: "/nginx-data"
matrix_nginx_proxy_data_path_extension: "/matrix_domain"
matrix_nginx_proxy_confd_path: "{{ matrix_nginx_proxy_base_path }}/conf.d"
# List of systemd services that matrix-nginx-proxy.service depends on
@ -75,6 +76,9 @@ matrix_nginx_proxy_container_federation_host_bind_port: '8448'
# in the `{{ matrix_nginx_proxy_data_path }}/matrix-domain` (`/matrix/nginx-proxy/data/matrix-domain`) directory.
matrix_nginx_proxy_base_domain_serving_enabled: false
# Controls whether the base domain directory and default index.html file are created.
matrix_nginx_proxy_base_domain_create_directory: true
matrix_nginx_proxy_base_domain_hostname: "{{ matrix_domain }}"
# Controls whether `matrix_nginx_proxy_base_domain_homepage_template` would be dumped to an `index.html` file

View File

@ -127,7 +127,7 @@
mode: 0750
owner: "{{ matrix_user_username }}"
group: "{{ matrix_user_groupname }}"
when: matrix_nginx_proxy_base_domain_serving_enabled|bool
when: matrix_nginx_proxy_base_domain_serving_enabled|bool and matrix_nginx_proxy_base_domain_create_directory|bool
- name: Ensure Matrix nginx-proxy homepage for base domain exists
copy:
@ -136,7 +136,7 @@
mode: 0644
owner: "{{ matrix_user_username }}"
group: "{{ matrix_user_groupname }}"
when: matrix_nginx_proxy_base_domain_serving_enabled|bool and matrix_nginx_proxy_base_domain_homepage_enabled|bool
when: matrix_nginx_proxy_base_domain_serving_enabled|bool and matrix_nginx_proxy_base_domain_homepage_enabled|bool and matrix_nginx_proxy_base_domain_create_directory|bool
- name: Ensure Matrix nginx-proxy configuration for base domain exists
template:

View File

@ -1,7 +1,7 @@
#jinja2: lstrip_blocks: "True"
{% macro render_vhost_directives() %}
root {{ matrix_nginx_proxy_data_path_in_container if matrix_nginx_proxy_enabled else matrix_nginx_proxy_data_path }}/matrix-domain;
root {{ matrix_nginx_proxy_data_path_in_container if matrix_nginx_proxy_enabled else matrix_nginx_proxy_data_path }}{{ matrix_nginx_proxy_data_path_extension }};
gzip on;
gzip_types text/plain application/json;