-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
109 lines (100 loc) · 2.58 KB
/
docker-compose.yml
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
version: "3"
services:
proxy:
image: proxy:latest
build:
context: .
dockerfile: docker/proxy/Dockerfile
restart: always
hostname: proxy
container_name: proxy
depends_on:
- prometheus
- node-exporter
environment:
PROXY_UPSTREAM_NODEEXPORTER_HOST: node-exporter
PROXY_UPSTREAM_NODEEXPORTER_PORT: 9100
PROXY_UPSTREAM_CADVISOR_HOST: cadvisor
PROXY_UPSTREAM_CADVISOR_PORT: 8080
PROXY_UPSTREAM_PROMETHEUS_HOST: prometheus
PROXY_UPSTREAM_PROMETHEUS_PORT: 9090
PROXY_UPSTREAM_GRAFANA_HOST: grafana
PROXY_UPSTREAM_GRAFANA_PORT: 3000
ports:
- 127.0.0.1:80:80
- 127.0.0.1:443:443
networks:
- monitoring
node-exporter:
image: prom/node-exporter:latest
restart: always
hostname: node-exporter
container_name: node-exporter
user: "1001:1001"
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /:/rootfs:ro
command:
- '--path.procfs=/host/proc'
- '--path.sysfs=/host/sys'
- --collector.tcpstat
- --collector.wifi
- --collector.processes
- --collector.filesystem.ignored-mount-points
- "^/(sys|proc|dev|host|etc|rootfs/var/lib/docker/containers|rootfs/var/lib/docker/overlay2|rootfs/run/docker/netns|rootfs/var/lib/docker/aufs)($$|/)"
networks:
- monitoring
cadvisor:
image: cadvisor:latest
build:
context: .
dockerfile: docker/cadvisor/Dockerfile
args:
VERSION: "v0.38.6"
restart: always
hostname: cadvisor
container_name: cadvisor
volumes:
- /:/rootfs:ro
- /var/run:/var/run:rw
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
networks:
- monitoring
prometheus:
image: prom/prometheus:latest
restart: always
hostname: prometheus
container_name: prometheus
user: "65534:65534"
depends_on:
- node-exporter
volumes:
- /home/motioneye/prometheus/:/etc/prometheus/
- prometheus:/prometheus
networks:
- monitoring
grafana:
image: grafana/grafana:latest
restart: always
hostname: grafana
container_name: grafana
user: "1001:1001"
depends_on:
- prometheus
environment:
GF_SECURITY_ADMIN_USER: admin
GF_SECURITY_ADMIN_PASSWORD: admin
GF_USERS_ALLOW_SIGN_UP: "false"
GF_SERVER_ROOT_URL: "%(protocol)s://%(domain)s:%(http_port)s/grafana/"
GF_SERVER_SERVE_FROM_SUB_PATH: "true"
volumes:
- grafana:/var/lib/grafana
networks:
- monitoring
volumes:
prometheus:
grafana:
networks:
monitoring: