From 6f26d92d00548ee03f0bda89b2ae8cc3d5b454cb Mon Sep 17 00:00:00 2001 From: Florian RICHER Date: Mon, 25 Sep 2023 15:20:32 +0200 Subject: [PATCH] Add watchtower in prometheus --- roles/watchtower/templates/docker-compose.yml.j2 | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/roles/watchtower/templates/docker-compose.yml.j2 b/roles/watchtower/templates/docker-compose.yml.j2 index f54c0d2..9ecb32b 100644 --- a/roles/watchtower/templates/docker-compose.yml.j2 +++ b/roles/watchtower/templates/docker-compose.yml.j2 @@ -7,8 +7,17 @@ services: container_name: watchtower volumes: - /var/run/docker.sock:/var/run/docker.sock + networks: + - metrics + environment: + WATCHTOWER_HTTP_API_TOKEN: watchtower + WATCHTOWER_HTTP_API_METRICS: 'true' logging: driver: loki options: loki-url: "https://lokidoki:vEGH5Z5siWgcDkNknvCVzPCyqhHSBJCBjeBRZJvxUP8SdgfxJ6AqCGutCWugGsx5@loki.mrdev023.fr/loki/api/v1/push" - mode: non-blocking \ No newline at end of file + mode: non-blocking + +networks: + metrics: + external: true \ No newline at end of file