forked from jonaubf/anern-inverter-monitoring
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yml
58 lines (55 loc) · 1.49 KB
/
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
version: '3.2'
services:
anern_monitoring:
build: .
privileged: true
restart: always
volumes:
- ./:/app
- /dev:/dev
command: gunicorn anern_monitoring.app:monitoring_app -b :8081 --worker-class aiohttp.GunicornWebWorker --reload --access-logfile -
ports:
- "8081:8081"
healthcheck:
test: curl --fail http://localhost:8081/metrics || bash -c 'kill -s 15 -1 && (sleep 10; kill -s 9 -1) && reboot'
interval: 30s
timeout: 10s
retries: 2
logging:
driver: json-file
options:
max-size: 50m
prometheus:
image: prom/prometheus:latest
volumes:
- ./prometheus:/etc/prometheus
- ~/prometheus_data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
- '--web.console.templates=/usr/share/prometheus/consoles'
links:
- anern_monitoring
restart: always
ports:
- "9090:9090"
logging:
driver: json-file
options:
max-size: 50m
grafana:
image: grafana/grafana
user: '472'
restart: always
environment:
GF_INSTALL_PLUGINS: 'grafana-clock-panel,grafana-simple-json-datasource'
volumes:
- ~/grafana_data:/var/lib/grafana
- ./grafana/provisioning/:/etc/grafana/provisioning/
env_file:
- ./grafana/config.monitoring
ports:
- "3000:3000"
depends_on:
- prometheus