-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
147 lines (138 loc) · 3.45 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
version: '3.8'
volumes:
vol_prometheus: {}
vol_grafana: {}
vol_grovepi_var: {}
services:
prometheus:
image: prom/prometheus:v2.40.7
container_name: prometheus
user: root
env_file:
- envs/global
volumes:
- ./dockers/prometheus:/etc/prometheus/
- vol_prometheus:/data
ports:
- "9090:9090"
command:
- '--storage.tsdb.path=/data'
- '--config.file=/etc/prometheus/prometheus.yml'
- '--enable-feature=expand-external-labels'
restart: always
grovepi_exporter:
env_file:
- envs/global
- envs/grovepi
- envs/alerts_threshold
container_name: grovepi_exporter
privileged: true
stdin_open: true
tty: true
ports:
- "8081:8081"
command: "python /code/collector.py"
build:
context: ./dockers/grovepi_exporter/
dockerfile: ./Dockerfile
image: grovepi_exporter:latest
volumes:
- /dev/i2c-1:/dev/i2c-1
- ./dockers/grovepi_exporter/code:/code
- vol_grovepi_var:/code/var
devices:
- /dev/i2c-1:/dev/i2c-1
depends_on:
- prometheus
restart: always
grovepi_input:
env_file:
- envs/global
- envs/grovepi
- envs/alerts_threshold
container_name: grovepi_input
privileged: true
stdin_open: true
tty: true
command: "python /code/app.py"
image: grovepi_exporter:latest
volumes:
- /dev/i2c-1:/dev/i2c-1
- ./dockers/grovepi_input/code:/code
- vol_grovepi_var:/code/var
devices:
- /dev/i2c-1:/dev/i2c-1
depends_on:
- grovepi_exporter
restart: always
alertmanager:
image: prom/alertmanager:v0.24.0
container_name: alertmanager
env_file:
- envs/global
ports:
- "9093:9093"
volumes:
- ./dockers/alertmanager:/etc/alertmanager/
command:
- '--config.file=/etc/alertmanager/config.yml'
depends_on:
- grovepi_input
restart: always
grovepi_receiver:
image: grovepi_receiver:latest
build:
context: ./dockers/grovepi_receiver/
dockerfile: ./Dockerfile
env_file:
- envs/global
- envs/grovepi
container_name: grovepi_receiver
privileged: true
stdin_open: true
tty: true
ports:
- "8082:8082"
command: "python /code/app.py"
volumes:
- /dev/i2c-1:/dev/i2c-1
- ./dockers/grovepi_receiver/code:/code
- vol_grovepi_var:/code/var
devices:
- /dev/i2c-1:/dev/i2c-1
depends_on:
- alertmanager
- grovepi_exporter
restart: always
node_exporter:
image: quay.io/prometheus/node-exporter:v1.5.0
container_name: node_exporter
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /:/rootfs:ro
command:
- '--path.procfs=/host/proc'
- '--path.rootfs=/rootfs'
- '--path.sysfs=/host/sys'
- '--collector.filesystem.ignored-mount-points=^/(sys|proc|dev|host|etc)($$|/)'
restart: unless-stopped
ports:
- "9100:9100"
depends_on:
- grovepi_receiver
restart: always
grafana:
image: grafana/grafana:9.3.1
container_name: grafana
env_file:
- envs/global
volumes:
- vol_grafana:/var/lib/grafana
- ./dockers/grafana/provisioning/dashboards:/etc/grafana/provisioning/dashboards
- ./dockers/grafana/provisioning/datasources:/etc/grafana/provisioning/datasources
ports:
- "3000:3000"
depends_on:
- node_exporter
restart: always