From b59f6e648957cf761843619eacbf5b665616e7ba Mon Sep 17 00:00:00 2001 From: Olivier Navas Date: Wed, 25 Dec 2024 22:06:41 +0100 Subject: [PATCH] Ajout authentification et tls sur nodeexporter via traefik --- templates/docker-compose.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/templates/docker-compose.yml b/templates/docker-compose.yml index a5c92d9..8059d74 100644 --- a/templates/docker-compose.yml +++ b/templates/docker-compose.yml @@ -20,12 +20,14 @@ services: traefik.docker.network: traefik traefik.http.routers.nodeexporter.entrypoints: nodeexporter traefik.http.routers.nodeexporter.tls: true - traefik.http.routers.nodeexporter.rule: Host(`{{ ansible_fqdn }}`) + traefik.http.routers.nodeexporter.rule: Host(`{{ ansible_host }}`) traefik.http.services.nodeexporter.loadbalancer.server.port: 9100 traefik.http.routers.nodeexporter.middlewares: nodeexporter_auth traefik.http.middlewares.nodeexporter_auth.basicauth.users: "{{ docker_nodeexporter_auth_user }}:{{ docker_nodeexporter_auth_password }}" ports: - {{ docker_nodeexporter_port }}:9100 + networks: + - traefik networks: traefik: