add watchtower enable label

This commit is contained in:
tom.chivert
2024-03-18 11:10:38 +01:00
parent 61e5bc823e
commit 1874526af4
3 changed files with 11 additions and 0 deletions

View File

@ -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:

View File

@ -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) }}`)