-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
38 lines (37 loc) · 1002 Bytes
/
docker-compose.yml
File metadata and controls
38 lines (37 loc) · 1002 Bytes
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
version: '3'
services:
telegraf:
build:
context: .
dockerfile: pi/Dockerfile
volumes:
# Mount for influxdb data directory and configuration
- ./telegraf/telegraf.conf:/etc/telegraf/telegraf.conf:ro
- ./demo/power.py:/demo/power.py:ro
devices:
- /dev/i2c-1:/dev/i2c-1
user: telegraf:998
networks:
- demo
restart: unless-stopped
# privileged: true
influxdb:
image: influxdb:latest
volumes:
# Mount for influxdb data directory and configuration
- ./influxdb:/var/lib/influxdb2:rw
ports:
- 8086:8086
environment:
- DOCKER_INFLUXDB_INIT_MODE=setup
- DOCKER_INFLUXDB_INIT_USERNAME=influxdb
- DOCKER_INFLUXDB_INIT_PASSWORD=influxdb
- DOCKER_INFLUXDB_INIT_ORG=influxdata
- DOCKER_INFLUXDB_INIT_BUCKET=rawdata
- DOCKER_INFLUXDB_INIT_RETENTION=2h
- DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=edge
networks:
- demo
restart: unless-stopped
networks:
demo: