Ajout authentification et tls sur nodeexporter via traefik
This commit is contained in:
parent
e72e32084d
commit
b59f6e6489
1 changed files with 3 additions and 1 deletions
|
@ -20,12 +20,14 @@ services:
|
||||||
traefik.docker.network: traefik
|
traefik.docker.network: traefik
|
||||||
traefik.http.routers.nodeexporter.entrypoints: nodeexporter
|
traefik.http.routers.nodeexporter.entrypoints: nodeexporter
|
||||||
traefik.http.routers.nodeexporter.tls: true
|
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.services.nodeexporter.loadbalancer.server.port: 9100
|
||||||
traefik.http.routers.nodeexporter.middlewares: nodeexporter_auth
|
traefik.http.routers.nodeexporter.middlewares: nodeexporter_auth
|
||||||
traefik.http.middlewares.nodeexporter_auth.basicauth.users: "{{ docker_nodeexporter_auth_user }}:{{ docker_nodeexporter_auth_password }}"
|
traefik.http.middlewares.nodeexporter_auth.basicauth.users: "{{ docker_nodeexporter_auth_user }}:{{ docker_nodeexporter_auth_password }}"
|
||||||
ports:
|
ports:
|
||||||
- {{ docker_nodeexporter_port }}:9100
|
- {{ docker_nodeexporter_port }}:9100
|
||||||
|
networks:
|
||||||
|
- traefik
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
traefik:
|
traefik:
|
||||||
|
|
Loading…
Reference in a new issue