`matrix_nginx_proxy_data_path` has always served as a base path, so we're renaming it to reflect that. Along with this, we're also introducing a new "data path" variable (`matrix_nginx_proxy_data_path`), which is really a data path this time. It's used for storing additional, non-configuration, files related to matrix-nginx-proxy.pull/116/head
| @@ -1,3 +1,12 @@ | |||||
| # 2019-03-12 | |||||
| ## (BC break) matrix-nginx-proxy data variable renamed | |||||
| `matrix_nginx_proxy_data_path` was renamed to `matrix_nginx_proxy_base_path`. | |||||
| There's a new `matrix_nginx_proxy_data_path` variable, which has a different use-purpose now (it's a subdirectory of `matrix_nginx_proxy_base_path` and is meant for storing various data files). | |||||
| # 2019-03-10 | # 2019-03-10 | ||||
| ## Dimension Integration Manager support | ## Dimension Integration Manager support | ||||
| @@ -5,8 +5,9 @@ matrix_nginx_proxy_enabled: true | |||||
| # those as more frequently out of date. | # those as more frequently out of date. | ||||
| matrix_nginx_proxy_docker_image: "nginx:1.15.9-alpine" | matrix_nginx_proxy_docker_image: "nginx:1.15.9-alpine" | ||||
| matrix_nginx_proxy_data_path: "{{ matrix_base_data_path }}/nginx-proxy" | |||||
| matrix_nginx_proxy_confd_path: "{{ matrix_nginx_proxy_data_path }}/conf.d" | |||||
| 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_confd_path: "{{ matrix_nginx_proxy_base_path }}/conf.d" | |||||
| # List of systemd services that matrix-nginx-proxy.service depends on | # List of systemd services that matrix-nginx-proxy.service depends on | ||||
| matrix_nginx_proxy_systemd_required_services_list: ['docker.service'] | matrix_nginx_proxy_systemd_required_services_list: ['docker.service'] | ||||
| @@ -18,13 +18,14 @@ | |||||
| owner: "{{ matrix_user_username }}" | owner: "{{ matrix_user_username }}" | ||||
| group: "{{ matrix_user_username }}" | group: "{{ matrix_user_username }}" | ||||
| with_items: | with_items: | ||||
| - "{{ matrix_nginx_proxy_base_path }}" | |||||
| - "{{ matrix_nginx_proxy_data_path }}" | - "{{ matrix_nginx_proxy_data_path }}" | ||||
| - "{{ matrix_nginx_proxy_confd_path }}" | - "{{ matrix_nginx_proxy_confd_path }}" | ||||
| - name: Ensure Matrix nginx-proxy configured (main config override) | - name: Ensure Matrix nginx-proxy configured (main config override) | ||||
| template: | template: | ||||
| src: "{{ role_path }}/templates/nginx/nginx.conf.j2" | src: "{{ role_path }}/templates/nginx/nginx.conf.j2" | ||||
| dest: "{{ matrix_nginx_proxy_data_path }}/nginx.conf" | |||||
| dest: "{{ matrix_nginx_proxy_base_path }}/nginx.conf" | |||||
| mode: 0644 | mode: 0644 | ||||
| when: "matrix_nginx_proxy_enabled" | when: "matrix_nginx_proxy_enabled" | ||||
| @@ -37,14 +38,6 @@ | |||||
| mode: 0400 | mode: 0400 | ||||
| when: "matrix_nginx_proxy_proxy_synapse_metrics_basic_auth_enabled and matrix_nginx_proxy_proxy_synapse_metrics" | when: "matrix_nginx_proxy_proxy_synapse_metrics_basic_auth_enabled and matrix_nginx_proxy_proxy_synapse_metrics" | ||||
| - name: Ensure matrix-synapse-metrics-htpasswd is mounted into the matrix-nginx-proxy container | |||||
| set_fact: | |||||
| matrix_nginx_proxy_container_additional_volumes: > | |||||
| {{ matrix_nginx_proxy_container_additional_volumes }} | |||||
| + | |||||
| {{ [{'src': '{{ matrix_nginx_proxy_data_path }}/matrix-synapse-metrics-htpasswd', 'dst': '/etc/nginx/.matrix-synapse-metrics-htpasswd', 'options': 'ro'}] }} | |||||
| when: "matrix_nginx_proxy_proxy_synapse_metrics_basic_auth_enabled and matrix_nginx_proxy_proxy_synapse_metrics" | |||||
| - name: Ensure Matrix nginx-proxy configured (generic) | - name: Ensure Matrix nginx-proxy configured (generic) | ||||
| template: | template: | ||||
| src: "{{ role_path }}/templates/nginx/conf.d/nginx-http.conf.j2" | src: "{{ role_path }}/templates/nginx/conf.d/nginx-http.conf.j2" | ||||
| @@ -154,7 +147,7 @@ | |||||
| - name: Ensure Matrix nginx-proxy configuration for main config override deleted | - name: Ensure Matrix nginx-proxy configuration for main config override deleted | ||||
| file: | file: | ||||
| path: "{{ matrix_nginx_proxy_data_path }}/nginx.conf" | |||||
| path: "{{ matrix_nginx_proxy_base_path }}/nginx.conf" | |||||
| state: absent | state: absent | ||||
| when: "not matrix_nginx_proxy_enabled" | when: "not matrix_nginx_proxy_enabled" | ||||
| @@ -146,7 +146,7 @@ server { | |||||
| {% if matrix_nginx_proxy_proxy_synapse_metrics_basic_auth_enabled %} | {% if matrix_nginx_proxy_proxy_synapse_metrics_basic_auth_enabled %} | ||||
| auth_basic "protected"; | auth_basic "protected"; | ||||
| auth_basic_user_file .matrix-synapse-metrics-htpasswd; | |||||
| auth_basic_user_file /nginx-data/matrix-synapse-metrics-htpasswd; | |||||
| {% endif %} | {% endif %} | ||||
| } | } | ||||
| {% endif %} | {% endif %} | ||||
| @@ -25,7 +25,8 @@ ExecStart=/usr/bin/docker run --rm --name matrix-nginx-proxy \ | |||||
| {% if matrix_nginx_proxy_proxy_matrix_federation_api_enabled %} | {% if matrix_nginx_proxy_proxy_matrix_federation_api_enabled %} | ||||
| -p 8448:8448 \ | -p 8448:8448 \ | ||||
| {% endif %} | {% endif %} | ||||
| -v {{ matrix_nginx_proxy_data_path }}/nginx.conf:/etc/nginx/nginx.conf:ro \ | |||||
| -v {{ matrix_nginx_proxy_base_path }}/nginx.conf:/etc/nginx/nginx.conf:ro \ | |||||
| -v {{ matrix_nginx_proxy_data_path }}:/nginx-data:ro \ | |||||
| -v {{ matrix_nginx_proxy_confd_path }}:/etc/nginx/conf.d:ro \ | -v {{ matrix_nginx_proxy_confd_path }}:/etc/nginx/conf.d:ro \ | ||||
| -v {{ matrix_ssl_config_dir_path }}:{{ matrix_ssl_config_dir_path }}:ro \ | -v {{ matrix_ssl_config_dir_path }}:{{ matrix_ssl_config_dir_path }}:ro \ | ||||
| -v {{ matrix_static_files_base_path }}:{{ matrix_static_files_base_path }}:ro \ | -v {{ matrix_static_files_base_path }}:{{ matrix_static_files_base_path }}:ro \ | ||||