-
Notifications
You must be signed in to change notification settings - Fork 6
/
grafana.yaml
50 lines (46 loc) · 1.6 KB
/
grafana.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
# Generated automatically from grafana-tp-link script
version: "3.7"
services:
# setup grafana
grafana:
container_name: grafana-local
image: grafana/grafana:latest
# here you put your user id that owns the directories - 1000 is an example!
user: "1000"
# setup grafana volume mounts for persistence.
volumes:
- "/usr/grafana-container-data/data:/var/lib/grafana"
- "/usr/grafana-container-data/log:/var/log/grafana"
- "/usr/grafana-container-data/config:/etc/grafana"
# this is the default port used by Grafana - if you need to use another, change it.
depends_on:
- prometheus
ports:
- 3000:3000
# the service is always restarted unless it is manually stopped.
restart: unless-stopped
# setup prometheus database
prometheus:
container_name: prometheus-local
image: prom/prometheus:latest
command:
- "--storage.tsdb.retention.time=3y"
- "--web.enable-lifecycle"
- "--config.file=/etc/prometheus/prometheus.yml"
user: "1000"
ports:
- 9090:9090
volumes:
- /usr/prometheus-container-data/config:/etc/prometheus
- /usr/prometheus-container-data/data:/prometheus
depends_on:
- tp-link-plug-exporter
restart: unless-stopped
# setup the tp-link exporter
tp-link-plug-exporter:
container_name: tp-link-plug-exporter-local
image: fffonion/tplink-plug-exporter:latest
ports:
- 9233:9233
# the service is always restarted unless it is manually stopped.
restart: unless-stopped