-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
123 lines (113 loc) · 2.57 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
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
version: "3.8"
services:
mosquitto:
image: eclipse-mosquitto:latest
container_name: mosquitto
hostname: mosquitto
volumes:
- ./mosquitto/mosquitto.conf:/mosquitto/config/mosquitto.conf
restart: always
ports:
- 1883:1883
- 9001:9001
networks:
se4iot:
ipv4_address: 172.20.0.100
sensors:
image: xbit18/sensors
container_name: iot-sensors
# build:
# context: ./sensors/
# dockerfile: Dockerfile
restart: always
networks:
se4iot:
ipv4_address: 172.20.0.101
depends_on:
- mosquitto
- config
config:
image: xbit18/config
container_name: config
hostname: config
# build:
# context: ./config/
# dockerfile: Dockerfile
volumes:
- ./config/config.json:/app/config.json
restart: always
networks:
se4iot:
ipv4_address: 172.20.0.108
depends_on:
- mosquitto
- node-red
- grafana
actuators:
image: xbit18/actuators
container_name: iot-actuators
# build:
# context: ./actuators/
# dockerfile: Dockerfile
restart: always
networks:
se4iot:
ipv4_address: 172.20.0.105
depends_on:
- mosquitto
influxdb:
image: influxdb:latest
container_name: influxdb
hostname: influx
restart: always
environment:
# Use these same configurations parameters in your telegraf configuration, mytelegraf.conf.
- DOCKER_INFLUXDB_INIT_MODE=setup
- DOCKER_INFLUXDB_INIT_USERNAME=admin
- DOCKER_INFLUXDB_INIT_PASSWORD=adminadmin
- DOCKER_INFLUXDB_INIT_ORG=univaq
- DOCKER_INFLUXDB_INIT_BUCKET=iot
- DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=iotinfluxdbtoken
ports:
- '8086:8086'
networks:
se4iot:
ipv4_address: 172.20.0.103
node-red:
image: nodered/node-red:latest
hostname: nodered
container_name: node-red
restart: always
ports:
- 1880:1880
networks:
se4iot:
ipv4_address: 172.20.0.102
volumes:
- ./node-red:/data
depends_on:
- mosquitto
- influxdb
grafana:
image: grafana/grafana:latest
container_name: grafana
hostname: grafana
volumes:
- ./grafana:/var/lib/grafana
- ./grafana.ini:/etc/grafana/grafana.ini
environment:
- GF_SERVER_ROOT_URL=http://172.20.0.104:3000
restart: always
ports:
- 3000:3000
networks:
se4iot:
ipv4_address: 172.20.0.104
depends_on:
- influxdb
networks:
se4iot:
driver: bridge
ipam:
config:
- subnet: 172.20.0.0/16