From f6061e1b5ee14ad7eda07f465d491f02a2294a85 Mon Sep 17 00:00:00 2001 From: Sam Al-Sapti Date: Sun, 9 Jul 2023 21:08:42 +0200 Subject: [PATCH] Use service names instead of subdomains for vhost file names --- roles/docker/files/vhost/{_root => base_domain} | 0 roles/docker/files/vhost/{docker => docker_registry} | 0 roles/docker/files/vhost/{social => mastodon} | 0 roles/docker/files/vhost/{cloud => nextcloud} | 0 roles/docker/files/vhost/{www => www.base_domain} | 0 roles/docker/tasks/services/docker_registry.yml | 2 +- roles/docker/tasks/services/mastodon.yml | 2 +- roles/docker/tasks/services/nextcloud.yml | 2 +- roles/docker/tasks/services/websites/data.coop.yml | 4 ++-- 9 files changed, 5 insertions(+), 5 deletions(-) rename roles/docker/files/vhost/{_root => base_domain} (100%) rename roles/docker/files/vhost/{docker => docker_registry} (100%) rename roles/docker/files/vhost/{social => mastodon} (100%) rename roles/docker/files/vhost/{cloud => nextcloud} (100%) rename roles/docker/files/vhost/{www => www.base_domain} (100%) diff --git a/roles/docker/files/vhost/_root b/roles/docker/files/vhost/base_domain similarity index 100% rename from roles/docker/files/vhost/_root rename to roles/docker/files/vhost/base_domain diff --git a/roles/docker/files/vhost/docker b/roles/docker/files/vhost/docker_registry similarity index 100% rename from roles/docker/files/vhost/docker rename to roles/docker/files/vhost/docker_registry diff --git a/roles/docker/files/vhost/social b/roles/docker/files/vhost/mastodon similarity index 100% rename from roles/docker/files/vhost/social rename to roles/docker/files/vhost/mastodon diff --git a/roles/docker/files/vhost/cloud b/roles/docker/files/vhost/nextcloud similarity index 100% rename from roles/docker/files/vhost/cloud rename to roles/docker/files/vhost/nextcloud diff --git a/roles/docker/files/vhost/www b/roles/docker/files/vhost/www.base_domain similarity index 100% rename from roles/docker/files/vhost/www rename to roles/docker/files/vhost/www.base_domain diff --git a/roles/docker/tasks/services/docker_registry.yml b/roles/docker/tasks/services/docker_registry.yml index d8c2347..3adee6d 100644 --- a/roles/docker/tasks/services/docker_registry.yml +++ b/roles/docker/tasks/services/docker_registry.yml @@ -2,7 +2,7 @@ --- - name: copy docker registry vhost configuration copy: - src: vhost/docker + src: vhost/docker_registry dest: "{{ services.nginx_proxy.volume_folder }}/vhost/{{ services.docker_registry.domain }}" mode: "0644" diff --git a/roles/docker/tasks/services/mastodon.yml b/roles/docker/tasks/services/mastodon.yml index a99d92d..b6a623e 100644 --- a/roles/docker/tasks/services/mastodon.yml +++ b/roles/docker/tasks/services/mastodon.yml @@ -21,7 +21,7 @@ - name: Upload vhost config for root domain copy: - src: vhost/social + src: vhost/mastodon dest: "{{ services.nginx_proxy.volume_folder }}/vhost/{{ services.mastodon.domain }}" - name: Copy PostgreSQL config diff --git a/roles/docker/tasks/services/nextcloud.yml b/roles/docker/tasks/services/nextcloud.yml index 337a6ed..f1d19b0 100644 --- a/roles/docker/tasks/services/nextcloud.yml +++ b/roles/docker/tasks/services/nextcloud.yml @@ -2,7 +2,7 @@ --- - name: upload vhost config for cloud.data.coop copy: - src: vhost/cloud + src: vhost/nextcloud dest: "{{ services.nginx_proxy.volume_folder }}/vhost/{{ services.nextcloud.domain }}" notify: "restart nginx" diff --git a/roles/docker/tasks/services/websites/data.coop.yml b/roles/docker/tasks/services/websites/data.coop.yml index c803a8e..60dcab6 100644 --- a/roles/docker/tasks/services/websites/data.coop.yml +++ b/roles/docker/tasks/services/websites/data.coop.yml @@ -2,12 +2,12 @@ --- - name: Upload vhost config for root domain copy: - src: vhost/_root + src: vhost/base_domain dest: "{{ services.nginx_proxy.volume_folder }}/vhost/{{ base_domain }}" - name: Upload vhost config for WWW domain copy: - src: vhost/www + src: vhost/www.base_domain dest: "{{ services.nginx_proxy.volume_folder }}/vhost/www.{{ base_domain }}" - name: setup data.coop website docker container