From cd03e98f10219017824b523a5dd267a27bd4d362 Mon Sep 17 00:00:00 2001 From: Sam Al-Sapti Date: Wed, 7 Dec 2022 21:36:35 +0100 Subject: [PATCH] Add missing services to defaults/main.yml --- roles/docker/defaults/main.yml | 19 +++++++++++++++++++ roles/docker/tasks/services/watchtower.yml | 4 ++-- .../websites/2022.slides.data.coop.yml | 7 +++---- .../services/websites/new-new.data.coop.yml | 7 ++++--- .../tasks/services/websites/new.data.coop.yml | 7 +++---- 5 files changed, 31 insertions(+), 13 deletions(-) diff --git a/roles/docker/defaults/main.yml b/roles/docker/defaults/main.yml index 16e4821..f63a3d4 100644 --- a/roles/docker/defaults/main.yml +++ b/roles/docker/defaults/main.yml @@ -117,6 +117,21 @@ services: - "{{ base_domain }}" - "www.{{ base_domain }}" + new_data_coop_website: + file: websites/new.data.coop.yml + domain: "new.{{ base_domain }}" + version: hugo + + new_new_data_coop_website: + file: websites/new-new.data.coop.yml + domain: "new-new.{{ base_domain }}" + version: latest + + 2022_slides_website: + file: websites/2022.slides.data.coop.yml + domain: "2022.slides.{{ base_domain }}" + version: latest + cryptohagen_website: file: websites/cryptohagen.dk.yml domains: @@ -174,3 +189,7 @@ services: domain: "member.{{ base_domain }}" django_admins: "Vidir:valberg@orn.li" allowed_sender_domain: true + + watchtower: + file: watchtower.yml + version: amd64-1.5.1 diff --git a/roles/docker/tasks/services/watchtower.yml b/roles/docker/tasks/services/watchtower.yml index 87d3f4d..7641b0b 100644 --- a/roles/docker/tasks/services/watchtower.yml +++ b/roles/docker/tasks/services/watchtower.yml @@ -2,7 +2,7 @@ - name: watchtower container docker_container: name: watchtower - image: containrrr/watchtower:1.4.0 + image: containrrr/watchtower:{{ services.watchtower.version }} restart_policy: unless-stopped networks: - name: external_services @@ -11,4 +11,4 @@ - "{{ services.docker_registry.volume_folder }}/auth/config.json:/config.json" env: WATCHTOWER_LABEL_ENABLE: "true" - WATCHTOWER_POLL_INTERVAL: "60" \ No newline at end of file + WATCHTOWER_POLL_INTERVAL: "60" diff --git a/roles/docker/tasks/services/websites/2022.slides.data.coop.yml b/roles/docker/tasks/services/websites/2022.slides.data.coop.yml index 260af82..cf1925e 100644 --- a/roles/docker/tasks/services/websites/2022.slides.data.coop.yml +++ b/roles/docker/tasks/services/websites/2022.slides.data.coop.yml @@ -1,16 +1,15 @@ --- - - name: setup 2022.slides.data.coop website using unipi docker_container: name: 2022.slides.data.coop_website - image: docker.data.coop/unipi:latest + image: docker.data.coop/unipi:{{ services.2022_slides_website.version }} restart_policy: unless-stopped purge_networks: yes networks: - name: external_services env: - VIRTUAL_HOST: "2022.slides.{{ services.data_coop_website.domains|join(',') }}" - LETSENCRYPT_HOST: "2022.slides.{{ services.data_coop_website.domains|join(',') }}" + VIRTUAL_HOST: "{{ services.2022_slides_website.domain }}" + LETSENCRYPT_HOST: "{{ services.2022_slides_website.domain }}" LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}" # Temporarily hosting on github command: "--remote=https://github.com/sorbusursina/datacoop-slides.git#slides2022" diff --git a/roles/docker/tasks/services/websites/new-new.data.coop.yml b/roles/docker/tasks/services/websites/new-new.data.coop.yml index 05ff1f3..d17af7b 100644 --- a/roles/docker/tasks/services/websites/new-new.data.coop.yml +++ b/roles/docker/tasks/services/websites/new-new.data.coop.yml @@ -1,14 +1,15 @@ +--- - name: setup new-new data.coop website using unipi docker_container: name: new-new.data.coop_website - image: docker.data.coop/unipi:latest + image: docker.data.coop/unipi:{{ services.new_new_data_coop_website.version }} restart_policy: unless-stopped purge_networks: yes networks: - name: external_services env: - VIRTUAL_HOST: "new-new.{{ services.data_coop_website.domains|join(',') }}" - LETSENCRYPT_HOST: "new-new.{{ services.data_coop_website.domains|join(',') }}" + VIRTUAL_HOST: "{{ services.new_new_data_coop_website.domain }}" + LETSENCRYPT_HOST: "{{ services.new_new_data_coop_website.domain }}" LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}" # The ssh-key is for read-only only command: "--remote=git@git.data.coop:halfd/new-website.git#main --ssh-key ed25519:Ag9RekCyC2eow4P/e5crVvSTQ7dTK46WkG0wqEPVJbU= --ssh-authenticator SHA256:l9kdLkb0kJm46pOJ4tCHCtFUaqV1ImbZWMA5oje10fI" diff --git a/roles/docker/tasks/services/websites/new.data.coop.yml b/roles/docker/tasks/services/websites/new.data.coop.yml index f70596a..90ba65c 100644 --- a/roles/docker/tasks/services/websites/new.data.coop.yml +++ b/roles/docker/tasks/services/websites/new.data.coop.yml @@ -1,15 +1,14 @@ --- - - name: setup new data.coop website using hugo docker_container: name: new.data.coop_website - image: docker.data.coop/data-coop-website:hugo + image: docker.data.coop/data-coop-website:{{ services.new_data_coop_website.version }} restart_policy: unless-stopped networks: - name: external_services env: - VIRTUAL_HOST : "new.{{ services.data_coop_website.domains|join(',') }}" - LETSENCRYPT_HOST: "new.{{ services.data_coop_website.domains|join(',') }}" + VIRTUAL_HOST : "{{ services.new_data_coop_website.domain }}" + LETSENCRYPT_HOST: "{{ services.new_data_coop_website.domain }}" LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}" labels: com.centurylinklabs.watchtower.enable: "true"