-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
90 lines (85 loc) · 2.41 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
version: '3.7'
services:
influxdb:
image: influxdb:latest
container_name: influxdb
networks:
- pzem004-network
ports:
- '8082:8082'
- '8086:8086'
- '8089:8089/udp'
volumes:
- influxdb_data:/var/lib/influxdb
environment:
AUTH_ENABLED: "true"
INFLUXDB_HTTP_LOG_ENABLED: "false"
INFLUXDB_REPORTING_DISABLED: "true"
INFLUXDB_ADMIN_ENABLED: "true"
INFLUXDB_ADMIN_USER: "admin"
INFLUXDB_ADMIN_PASSWORD: "admin"
INFLUXDB_DB: "monitoring"
INFLUXDB_USER: "monitoring"
INFLUXDB_USER_PASSWORD: "monitoring"
restart: unless-stopped
labels:
org.label-schema.group: "monitoring"
prometheus:
image: prom/prometheus:v2.39.1
container_name: prometheus
networks:
- pzem004-network
ports:
- '9090:9090'
volumes:
- ./prometheus/:/etc/prometheus:ro
- ./persistent/prometheus:/prometheus:rw
command:
- '--config.file=/etc/prometheus/configuration.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
- '--web.console.templates=/usr/share/prometheus/consoles'
- '--web.read-timeout=1m'
- '--query.timeout=1m'
- '--query.max-concurrency=32'
- '--web.max-connections=128'
- '--storage.tsdb.retention.time=96d'
- '--storage.tsdb.retention.size=8GB'
- '--storage.tsdb.no-lockfile'
- '--log.format=json'
- '--log.level=info'
restart: unless-stopped
labels:
org.label-schema.group: "monitoring"
grafana:
image: grafana/grafana:latest
container_name: grafana
networks:
- pzem004-network
ports:
- '3000:3000'
volumes:
- ./grafana/provisioning:/etc/grafana/provisioning
- grafana_data:/var/lib/grafana
environment:
GF_SERVER_ROOT_URL: "http://localhost:3000"
GF_SECURITY_DISABLE_INITIAL_ADMIN_CREATION: "true"
GF_AUTH_ANONYMOUS_ENABLED: "true"
GF_AUTH_DISABLE_SIGNOUT_MENU: "true"
GF_AUTH_DISABLE_LOGIN_FORM: "true"
GF_AUTH_ANONYMOUS_ORG_ROLE: "Admin"
GF_PATHS_DATA: "/var/lib/grafana"
GF_USERS_ALLOW_SIGN_UP: "false"
depends_on:
- influxdb
restart: unless-stopped
labels:
org.label-schema.group: "monitoring"
volumes:
influxdb_data:
grafana_data:
prometheus_data:
networks:
pzem004-network:
name: pzem004
external: true