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: