From 73adef15f942154180fba7596705fdffdecd5735 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=AD=C3=B0ir=20Valberg=20Gu=C3=B0mundsson?= Date: Tue, 9 Aug 2022 19:47:40 +0200 Subject: [PATCH] Fixing watchtower and membersystem. --- roles/docker/defaults/main.yml | 7 ++++++- roles/docker/tasks/services/docker_registry.yml | 1 + roles/docker/tasks/services/membersystem.yml | 9 +++++---- roles/docker/tasks/services/watchtower.yml | 5 ++--- 4 files changed, 14 insertions(+), 8 deletions(-) diff --git a/roles/docker/defaults/main.yml b/roles/docker/defaults/main.yml index 221a1493..8bfdc120 100644 --- a/roles/docker/defaults/main.yml +++ b/roles/docker/defaults/main.yml @@ -1,3 +1,4 @@ +--- volume_root_folder: "/docker-volumes" nginx: @@ -98,10 +99,14 @@ postfix: allowed_sender_domains: - "services.{{ base_domain }}" - "{{ passit.domain }}" - - "{{ fider.domain }}" - "{{ gitea.domain }}" - "{{ mastodon.domain }}" + - "{{ membersystem.domain }}" mastodon: domain: "social.{{ base_domain }}" volume_folder: "{{ volume_root_folder }}/mastodon" + +membersystem: + domain: "member.{{ base_domain }}" + django_admins: "Vidir:valberg@orn.li" \ No newline at end of file diff --git a/roles/docker/tasks/services/docker_registry.yml b/roles/docker/tasks/services/docker_registry.yml index ea8b6061..975db503 100644 --- a/roles/docker/tasks/services/docker_registry.yml +++ b/roles/docker/tasks/services/docker_registry.yml @@ -33,3 +33,4 @@ registry: "{{ docker_registry.domain }}" username: "docker" password: "{{ docker_password }}" + config_path: "{{ docker_registry.volume_folder }}/auth/config.json" diff --git a/roles/docker/tasks/services/membersystem.yml b/roles/docker/tasks/services/membersystem.yml index 573ff394..21172475 100644 --- a/roles/docker/tasks/services/membersystem.yml +++ b/roles/docker/tasks/services/membersystem.yml @@ -27,12 +27,13 @@ POSTGRES_PORT: 5432 EMAIL_BACKEND: "django.core.mail.backends.smtp.EmailBackend" EMAIL_URL: "smtp://noop@{{ smtp_host }}:{{ smtp_port }}" - VIRTUAL_HOST: "member.data.coop" - LETSENCRYPT_HOST: "member.data.coop" + VIRTUAL_HOST: "{{ membersystem.domain }}" + LETSENCRYPT_HOST: "{{ membersystem.domain }}" LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}" ALLOWED_HOSTS: "member.data.coop" - DJANGO_ADMINS: "Vidir:valberg@orn.li" - DEFAULT_FROM_EMAIL: "support@data.coop" + CSRF_TRUSTED_ORIGINS: "https://member.data.coop" + DJANGO_ADMINS: "{{ membersystem.django_admins }}" + DEFAULT_FROM_EMAIL: "noreply@{{ membersystem.domain }}" labels: com.centurylinklabs.watchtower.enable: "true" diff --git a/roles/docker/tasks/services/watchtower.yml b/roles/docker/tasks/services/watchtower.yml index 25295651..586ce249 100644 --- a/roles/docker/tasks/services/watchtower.yml +++ b/roles/docker/tasks/services/watchtower.yml @@ -8,8 +8,7 @@ - name: external_services volumes: - /var/run/docker.sock:/var/run/docker.sock - - /root/.docker/config.json:/root/.docker/config.json + - "{{ docker_registry.volume_folder }}/auth/config.json:/config.json" env: WATCHTOWER_LABEL_ENABLE: "true" - WATCHTOWER_POLL_INTERVAL: "600" - \ No newline at end of file + WATCHTOWER_POLL_INTERVAL: "60" \ No newline at end of file