add cadvisor
This commit is contained in:
parent
2d1b0146d4
commit
75e5c901af
@ -17,6 +17,7 @@ Available services
|
|||||||
- Watchtower
|
- Watchtower
|
||||||
- Grafana
|
- Grafana
|
||||||
- Maildev
|
- Maildev
|
||||||
|
- cadvisor
|
||||||
|
|
||||||
Role variables
|
Role variables
|
||||||
---------------
|
---------------
|
||||||
@ -50,6 +51,7 @@ Example variables
|
|||||||
- watchtower
|
- watchtower
|
||||||
- grafana
|
- grafana
|
||||||
- maildev
|
- maildev
|
||||||
|
- cadvisor
|
||||||
|
|
||||||
traefik_domain: 'mydomain.com'
|
traefik_domain: 'mydomain.com'
|
||||||
traefik_letsencrypt_email: 'cert@mydomain.com'
|
traefik_letsencrypt_email: 'cert@mydomain.com'
|
||||||
|
3
tasks/cadvisor.yml
Normal file
3
tasks/cadvisor.yml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
- include_tasks: base.yml
|
||||||
|
tags: ['docker_cadvisor']
|
24
templates/compose/cadvisor.yml.j2
Normal file
24
templates/compose/cadvisor.yml.j2
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
version: '3.7'
|
||||||
|
|
||||||
|
services:
|
||||||
|
cadvisor:
|
||||||
|
image: gcr.io/cadvisor/cadvisor:latest
|
||||||
|
container_name: cadvisor
|
||||||
|
restart: unless-stopped
|
||||||
|
command:
|
||||||
|
- "--housekeeping_interval=30s"
|
||||||
|
- "--docker_only=true"
|
||||||
|
- "--disable_metrics=percpu,sched,tcp,udp,disk,diskIO,accelerator,hugetlb,referenced_memory,cpu_topology,resctrl"
|
||||||
|
ports:
|
||||||
|
- {{ cadvisor_port | default("8080") }}:{{ cadvisor_port | default("8080") }}
|
||||||
|
volumes:
|
||||||
|
- /:/rootfs:ro
|
||||||
|
- /var/run:/var/run:rw
|
||||||
|
- /sys:/sys:ro
|
||||||
|
- /var/lib/docker/:/var/lib/docker:ro
|
||||||
|
depends_on:
|
||||||
|
- redis
|
||||||
|
|
||||||
|
redis:
|
||||||
|
image: redis:latest
|
||||||
|
container_name: cadvisor_redis
|
Loading…
x
Reference in New Issue
Block a user