From 7d13fc53029587ba2a3cfd775a5ebd20d6bdcc77 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 --- .../docker/files/vhost/{_root => base_domain} | 0 .../files/vhost/{docker => docker_registry} | 0 roles/docker/files/vhost/{social => mastodon} | 0 roles/docker/files/vhost/{cloud => nextcloud} | 0 .../files/vhost/{www => www.base_domain} | 0 roles/docker/st | 30 ------------------- .../docker/tasks/services/docker_registry.yml | 2 +- roles/docker/tasks/services/mastodon.yml | 2 +- roles/docker/tasks/services/nextcloud.yml | 2 +- .../tasks/services/websites/data.coop.yml | 4 +-- 10 files changed, 5 insertions(+), 35 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%) delete mode 100644 roles/docker/st 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/st b/roles/docker/st deleted file mode 100644 index 6ae8157..0000000 --- a/roles/docker/st +++ /dev/null @@ -1,30 +0,0 @@ -files/ -├── byro/ -│ └── deploy_entrypoint.sh -├── element/ -│ └── riot.im.conf -├── mastodon/ -│ └── postgresql.conf -├── matrix/ -│ └── log.config -├── privatebin/ -│ └── conf.php -├── sso/ -│ └── sso.data.coop.pem -└── vhost/ - ├── _root - ├── cloud - ├── docker - ├── element - ├── matrix - ├── social - └── www -templates/ -├── byro.env.j2 -├── element.config.json.j2 -├── mailu.env.j2 -├── mastodon.env.j2 -├── matrix.homeserver.yaml.j2 -├── rallly.env.j2 -├── restic.ssh.config.j2 -└── restic.ssh.known_hosts.j2 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