playground/docker-stack/cadvisor.yml

46 lines
983 B
YAML
Raw Normal View History

2022-10-09 16:59:31 +00:00
version: "3.8"
networks:
host-network:
name: host
external: true
prometheus-network:
external: true
traefik-network:
external: true
services:
cadvisor-service:
##image: docker.io/google/cadvisor
image: gcr.io/cadvisor/cadvisor
hostname: cadvisor-service-host
command:
- -logtostderr
#- -docker_only
environment:
2022-10-30 15:40:09 +00:00
- DS_NODE_NAME={{.Node.Hostname}}
- DS_SERVICE_NAME={{.Service.Name}}
- DS_TASK_NAME={{.Task.Name}}
2022-10-09 16:59:31 +00:00
networks:
- traefik-network
- prometheus-network
volumes:
- /:/rootfs:ro
- /var/run:/var/run:rw
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
- /dev/disk/:/dev/disk:ro
ports:
- target: 8080
published: 9080
protocol: tcp
mode: ingress
##privileged: true
deploy:
mode: global
restart_policy:
condition: on-failure
resources:
limits:
memory: 256MB