-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
92 lines (83 loc) · 2.02 KB
/
docker-compose.yml
File metadata and controls
92 lines (83 loc) · 2.02 KB
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
91
version: '3.6'
volumes:
influx_data:
external: true
grafana_data:
external: true
services:
sensor:
build: ./sensor
restart: unless-stopped
# Access to the Raspberry Pi system. I2C for the connection to the pHat pins for the sensors. GPIO for the shutdown buttons. Normal device functions don't seem to be working
privileged: true
depends_on:
- influxdb
# 1. Join the internal network so Sensor can upload data to the database
env_file: database.env
networks:
internal:
ipv4_address: 175.40.9.3
influxdb:
restart: unless-stopped
image: influxdb:2.0.4
# Attach influxdb only to the private network
networks:
internal:
ipv4_address: 175.40.9.2
priv_lan:
ipv4_address: 192.168.1.191
volumes:
- influx_data:/var/lib/influxdb2
- influx_data:/etc/influxdb2
ports:
- 8086
- 8088
grafana:
build: ./grafana
restart: unless-stopped
image: grafana/grafana:7.5.4
depends_on:
- influxdb
ports:
- 3000
volumes:
- 'grafana_data:/var/lib/grafana'
environment:
- 'GF_INSTALL_PLUGINS=grafana-clock-panel'
networks:
internal:
ipv4_address: 175.40.9.4
priv_lan:
ipv4_address: 192.168.1.190
telegraf:
env_file: database.env
image: telegraf
depends_on:
- influxdb
ports:
- 8125
- 8092:8092/udp
- 8094
environment:
HOST_PROC: /rootfs/proc
HOST_SYS: /rootfs/sys
HOST_ETC: /rootfs/etc
volumes:
- ./telegraf.conf:/etc/telegraf/telegraf.conf:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
- /sys:/rootfs/sys:ro
- /proc:/rootfs/proc:ro
- /etc:/rootfs/etc:ro
networks:
internal:
ipv4_address: 175.40.9.5
networks:
# Create the internal network
internal:
ipam:
config:
- subnet: 175.40.9.0/29
# The priv_lan network is already setup, so it is an 'external' network
priv_lan:
external:
name: priv_lan