diff --git a/docs/variables.md b/docs/variables.md index 277f46b..f5886e4 100644 --- a/docs/variables.md +++ b/docs/variables.md @@ -26,6 +26,7 @@ | prometheus_server_scrape_interval | The scrape interval for Prometheus server | Integer | 5 | | prometheus_server_scrape_timeout | The scrape timeout for Prometheus server | Integer | 5 | | prometheus_server_version | The version of Prometheus server to install | String | "latest" | +| prometheus_watchtower_enable | Whether to enable watchtower on this container | Boolean | true | ## Prometheus Exporters @@ -79,3 +80,4 @@ | grafana_router_logging | Whether to enable router logging in Grafana | Boolean | false | | grafana_disable_sanitize_html | Whether to disable HTML sanitization in Grafana | Boolean | true | | grafana_traefik_entrypoint | The Traefik entrypoint for Grafana | String | 'websecure' | +| grafana_watchtower_enable | Whether to enable watchtower on this container | Boolean | true | diff --git a/templates/compose/cloudflare.yml.j2 b/templates/compose/cloudflare.yml.j2 index 989151d..ae421b3 100644 --- a/templates/compose/cloudflare.yml.j2 +++ b/templates/compose/cloudflare.yml.j2 @@ -12,6 +12,8 @@ services: environment: - CF_API_TOKEN={{ cloudflare_api_key }} - CF_API_EMAIL={{ cloudflare_api_email }} + labels: + com.centurylinklabs.watchtower.enable: {{ cloudflare_exporter_watchtower_enable | default('true') }} ports: - 8082:8080 networks: diff --git a/templates/compose/grafana-prometheus.yml.j2 b/templates/compose/grafana-prometheus.yml.j2 index a47aab2..39106bb 100644 --- a/templates/compose/grafana-prometheus.yml.j2 +++ b/templates/compose/grafana-prometheus.yml.j2 @@ -71,6 +71,7 @@ services: traefik.http.middlewares.grafana-clientips.ipwhitelist.sourcerange: {{ grafana_traefik_ipwhitelist }} traefik.http.routers.grafana.middlewares: "grafana-clientips@docker" {% endif %} + com.centurylinklabs.watchtower.enable: {{ grafana_watchtower_enable | default('true') }} ports: - "{{ grafana_port | default(3000) }}:3000" {% endif %} @@ -91,7 +92,10 @@ services: - grafana {% if prometheus_traefik_enable is defined %} - traefik +{% endif %} labels: + com.centurylinklabs.watchtower.enable: {{ prometheus_watchtower_enable | default('true') }} +{% if prometheus_traefik_enable is defined %} traefik.enable: true traefik.docker.network: traefik traefik.http.routers.prometheus.rule: Host(`{{ prometheus_domain|default(omit) }}`) @@ -126,7 +130,10 @@ services: - victoria-metrics-data:/victoria-metrics-data {% if prometheus_traefik_enable is defined %} - traefik +{% endif %} labels: + com.centurylinklabs.watchtower.enable: {{ prometheus_watchtower_enable | default('true') }} +{% if prometheus_traefik_enable is defined %} traefik.enable: true traefik.docker.network: traefik traefik.http.routers.prometheus.rule: Host(`{{ prometheus_domain|default(omit) }}`)