-
-
Save ideaengine007/3f0d34a5601cdc61cd940b90f48c5546 to your computer and use it in GitHub Desktop.
Config and Docker Compose YAMLs for observing Traefik configuration not being logged as metrics in cAdvisor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| services: | |
| traefik: | |
| image: "traefik:v2.4" | |
| ports: | |
| - "80:80" | |
| volumes: | |
| - "/var/run/docker.sock:/var/run/docker.sock" | |
| - "./traefik.yml:/etc/traefik/traefik.yml" | |
| - "./dynamic.yml:/etc/traefik/dynamic.yml" | |
| nginx: | |
| image: nginx:latest | |
| cadvisor: | |
| container_name: cadvisor | |
| image: gcr.io/cadvisor/cadvisor:latest | |
| ports: | |
| - "8080:8080" | |
| volumes: | |
| - "/:/rootfs" | |
| - "/var/run:/var/run" | |
| - "/sys:/sys" | |
| - "/var/snap/docker/common/var-lib-docker:/var/lib/docker:ro" | |
| - "/dev/disk/:/dev/disk" | |
| privileged: true | |
| devices: | |
| - "/dev/kmsg" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| http: | |
| routers: | |
| to-nginx: | |
| rule: "Host(`nswashere.local`)" | |
| service: nginx | |
| middlewares: | |
| - "auth" | |
| middlewares: | |
| auth: | |
| basicAuth: | |
| users: | |
| - "test:$2y$12$ci.4U63YX83CwkyUrjqxAucnmi2xXOIlEF6T/KdP9824f1Rf1iyNG" # credentials - test:test | |
| services: | |
| nginx: | |
| loadBalancer: | |
| servers: | |
| - url: http://nginx/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| entryPoints: | |
| web: | |
| # Listen on port 80 for incoming requests | |
| address: :80 | |
| providers: | |
| # Enable the file provider to define routers / middlewares / services in file | |
| file: | |
| filename: /etc/traefik/dynamic.yml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment