-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
52 lines (51 loc) · 1.29 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
version: "3.0"
services:
monitor:
build:
context: monitor
restart: always
devices:
- "/dev/ttyUSB0:/dev/ttyUSB0"
environment:
USB_DEVICE: "/dev/ttyUSB0"
DB_HOST: influxdb
DB_PORT: 8086
DB_USERNAME: root
DB_PASSWORD: root
DB_NAME: ups
INVERTER_MODEL: "must-pv1800"
depends_on:
- influxdb
tmpfs:
- /var/run
influxdb:
# if you have non-arm-v7 architecture, use regular influxdb image
image: arm32v7/influxdb
restart: always
environment:
DOCKER_INFLUXDB_INIT_USERNAME: root
DOCKER_INFLUXDB_INIT_PASSWORD: root
DOCKER_INFLUXDB_INIT_ORG: org
DOCKER_INFLUXDB_INIT_BUCKET: bucket
DOCKER_INFLUXDB_INIT_RETENTION: 30d
INFLUXDB_DB: ups
volumes:
- "metrics:/var/lib/influxdb"
grafana:
image: grafana/grafana:latest
restart: always
ports:
- "3000:3000" # expose for localhost
volumes:
- grafana-data:/var/lib/grafana
- ./grafana-provisioning:/etc/grafana/provisioning
environment:
- GF_INSTALL_PLUGINS=grafana-clock-panel,grafana-simple-json-datasource
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=admin
- GF_SERVER_HTTP_PORT=3000
depends_on:
- influxdb
volumes:
metrics:
grafana-data: