Ajout authentification et tls sur nodeexporter via traefik

This commit is contained in:
Navas 2024-12-25 22:06:41 +01:00
parent e72e32084d
commit b59f6e6489

View file

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