This repository was archived by the owner on Nov 15, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml.with.limits
More file actions
80 lines (76 loc) · 2.04 KB
/
docker-compose.yml.with.limits
File metadata and controls
80 lines (76 loc) · 2.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
version: "3.4"
services:
influxdb:
image: influxdb:1.7.9
container_name: influxdb
restart: on-failure:2
ports:
- "8086:8086"
networks:
- backend
volumes:
- /srv/metrics-data/monitoring/influxdb:/var/lib/influxdb
environment:
- INFLUXDB_DB="cadvisor"
- INFLUXDB_ADMIN_USER=${INFLUXDB_ADMIN_USER}
- INFLUXDB_ADMIN_PASSWORD=${INFLUXDB_ADMIN_PASSWORD}
deploy:
resources:
limits:
cpus: "0.50"
memory: "1G"
cadvisor:
image: google/cadvisor:v0.33.0
container_name: cadvisor
restart: on-failure:5
links:
- influxdb:srv-influxdb
command: -storage_driver=influxdb -storage_driver_db=cadvisor -storage_driver_host=srv-influxdb:8086
ports:
- "8080:8080"
networks:
- frontend
- backend
volumes:
- /:/rootfs:ro
- /var/run:/var/run:rw
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker
- /srv/metrics-env/monitoring/provisioning/cadvisor:/etc/cadvisor
deploy:
resources:
limits:
cpus: "0.50"
memory: "200M"
grafana:
image: grafana/grafana:6.5.0
container_name: grafana
user: "0"
restart: on-failure:5
links:
- influxdb:srv-influxdb
- cadvisor:srv-cadvisor
ports:
- 3000:3000
networks:
- backend
- frontend
command: dockerize -wait tcp://influxdb:8086 -wait tcp://cadvisor:8080
volumes:
- /srv/metrics-data/monitoring/grafana/data:/var/lib/grafana
- /srv/metrics-data/monitoring/grafana/dashboards:/var/lib/grafana/dashboards
- /srv/metrics-env/monitoring/provisioning/grafana:/etc/grafana/provisioning/
- /srv/metrics-env/monitoring/provisioning/grafana/grafana.ini:/etc/grafana/grafana.ini:ro
environment:
- GF_SECURITY_ADMIN_PASSWORD=${GF_SECURITY_ADMIN_PASSWORD}
- INFLUXDB_ADMIN_USER=${INFLUXDB_ADMIN_USER}
deploy:
resources:
limits:
cpus: "0.30"
memory: "100M"
networks:
backend:
internal: true
frontend:
driver: bridge