From 9f3274dae739bf0acd1e286137387a5199846d97 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Fri, 7 Mar 2025 18:35:04 +0100 Subject: [PATCH] feat(landingpage): Automatically update --- roles/landingpage/defaults/main.yml | 2 ++ roles/landingpage/templates/docker-stack.yml.j2 | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/roles/landingpage/defaults/main.yml b/roles/landingpage/defaults/main.yml index fed7288..cdfb3fd 100644 --- a/roles/landingpage/defaults/main.yml +++ b/roles/landingpage/defaults/main.yml @@ -5,5 +5,7 @@ landingpage_upstream_file_dir: "{{ docker_stack_files_dir }}/{{ stack_name }}" landingpage_use_https: true +landingpage_autoupdate: true + # the subdomain link landingpage will be reachable under subdomain_alias: www diff --git a/roles/landingpage/templates/docker-stack.yml.j2 b/roles/landingpage/templates/docker-stack.yml.j2 index fdaa2b4..fee59db 100644 --- a/roles/landingpage/templates/docker-stack.yml.j2 +++ b/roles/landingpage/templates/docker-stack.yml.j2 @@ -12,6 +12,11 @@ services: entrypoint: sh -c "/docker-entrypoint.sh nginx -g 'daemon off;'" networks: - "{{ docker_swarm_public_network_name }}" +{% if landingpage_autoupdate is defined and landingpage_autoupdate %} + deploy: + labels: + - shepherd.autoupdate=true +{% endif %} networks: "{{ docker_swarm_public_network_name }}":