45 lines
959 B
YAML
45 lines
959 B
YAML
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:
|
|
- DS_NODE_NAME={{.Node.Hostname}}
|
|
- DS_SERVICE_NAME={{.Service.Name}}
|
|
- DS_TASK_NAME={{.Task.Name}}
|
|
networks:
|
|
- 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
|