From 000216d74d037ee34ad75121dae6d394b6ede161 Mon Sep 17 00:00:00 2001 From: Sam Al-Sapti Date: Wed, 7 Dec 2022 21:49:36 +0100 Subject: [PATCH] Add vhost config for www.data.coop and move vhost-root copying task to data.coop.yml --- roles/docker/files/configs/vhost-www | 4 ++++ roles/docker/tasks/services/matrix_riot.yml | 5 ----- roles/docker/tasks/services/websites/data.coop.yml | 9 +++++++++ 3 files changed, 13 insertions(+), 5 deletions(-) create mode 100644 roles/docker/files/configs/vhost-www diff --git a/roles/docker/files/configs/vhost-www b/roles/docker/files/configs/vhost-www new file mode 100644 index 0000000..713a6d2 --- /dev/null +++ b/roles/docker/files/configs/vhost-www @@ -0,0 +1,4 @@ +server { + server_name www.data.coop; + return 301 $scheme://data.coop$request_uri; +} diff --git a/roles/docker/tasks/services/matrix_riot.yml b/roles/docker/tasks/services/matrix_riot.yml index 666c544..34f302d 100644 --- a/roles/docker/tasks/services/matrix_riot.yml +++ b/roles/docker/tasks/services/matrix_riot.yml @@ -36,11 +36,6 @@ src: files/configs/riot/riot.im.conf dest: "{{ services.riot.volume_folder }}/data/riot.im.conf" -- name: upload vhost config for root domain - template: - src: files/configs/matrix/vhost-root - dest: "{{ services.nginx_proxy.volume_folder }}/vhost/{{ base_domain }}" - - name: upload vhost config for matrix domain template: src: files/configs/matrix/vhost-matrix diff --git a/roles/docker/tasks/services/websites/data.coop.yml b/roles/docker/tasks/services/websites/data.coop.yml index 2492757..6a0fade 100644 --- a/roles/docker/tasks/services/websites/data.coop.yml +++ b/roles/docker/tasks/services/websites/data.coop.yml @@ -1,4 +1,13 @@ --- +- name: Upload vhost config for root domain + copy: + src: files/configs/vhost-root + dest: "{{ services.nginx_proxy.volume_folder }}/vhost/{{ base_domain }}" + +- name: Upload vhost config for WWW domain + copy: + src: files/configs/vhost-www + dest: "{{ services.nginx_proxy.volume_folder }}/vhost/www.{{ base_domain }}" - name: setup data.coop website docker container docker_container: