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

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

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