-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose.yaml
113 lines (112 loc) · 2.93 KB
/
docker-compose.yaml
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
networks:
front-tier:
back-tier:
version: '3'
services:
autoheal:
restart: always
image: docker:stable
entrypoint: "/bin/sh -c"
command: '/scripts/restart_bms-db'
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- $PWD/scripts:/scripts
prometheus:
image: prom/prometheus:v2.32.1
volumes:
- ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
- ./prometheus/storage:/prometheus
command: "--config.file=/etc/prometheus/prometheus.yml --storage.tsdb.path=/prometheus --storage.tsdb.retention.time=2y"
restart: always
ports:
- 9090:9090
depends_on:
- bms-exporter
networks:
- back-tier
node-exporter:
image: prom/node-exporter
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /:/rootfs:ro
command:
- '--path.procfs=/host/proc'
- '--path.sysfs=/host/sys'
- --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)($$|/)"
ports:
- 9100:9100
networks:
- back-tier
restart: always
# docker run -p 8000:8000 -v $PWD/bms-exporter:/app -v $PWD/bms-db:/bms-db -e DATABASE=/bms-db/bms.db -it --entrypoint /bin/sh bms-exporter
bms-exporter:
build: ./bms-exporter/
container_name: bms-exporter
image: bms-exporter
restart: always
volumes:
- ./bms-exporter/:/app
- ./bms-db:/bms-db
ports:
- 8000:8000
environment:
- DATABASE=/bms-db/bms.db
networks:
- back-tier
depends_on:
- bms-db
# docker run -it -v $PWD/bms-db:/app -v /run/dbus/system_bus_socket:/run/dbus/system_bus_socket --privileged bms-db
bms-db:
build: ./bms-db/
container_name: bms-db
image: bms-db
restart: always
privileged: true
volumes:
- ./bms-db:/app
- /run/dbus/system_bus_socket:/run/dbus/system_bus_socket
network_mode: host
command: /app/bms-db A4:C1:38:9B:8B:2F
fritzbox-exporter:
container_name: fritzbox_exporter
image: fritzbox_exporter
restart: always
ports:
- 9133:9133
networks:
- back-tier
command:
- -gateway-address
- 192.168.178.1
dht-exporter:
build: ./dht-exporter/
container_name: dht-exporter
image: dht-exporter
restart: always
ports:
- 8001:8001
networks:
- back-tier
command: "app/dht_exporter.py -r pi -g 4"
privileged: true
volumes:
- ./dht-exporter:/app
grafana:
image: grafana/grafana:7.0.1
user: "104"
depends_on:
- prometheus
ports:
- 3000:3000
volumes:
- ./grafana/grafana.ini:/etc/grafana/grafana.ini
- ./grafana/storage:/var/lib/grafana
- ./grafana/provisioning/:/etc/grafana/provisioning/
env_file:
- ./grafana/config.monitoring
networks:
- back-tier
- front-tier
restart: always