-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
120 lines (91 loc) · 3.08 KB
/
docker-compose.yml
File metadata and controls
120 lines (91 loc) · 3.08 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
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
version: "3"
services:
loadbalancer1:
image: loadbalancer4:latest
networks:
backend:
ipv4_address: 172.16.0.3
restart: "no"
command: [ "sourcePort=10000", "targetPort=9000", "zentrale1=172.16.1.1", "zentrale2=172.16.1.2", "zentrale3=172.16.1.3" ]
zentrale1:
image: zentrale4:latest
networks:
backend:
ipv4_address: 172.16.1.1
restart: "no"
command: ["mqttServerAddress=172.16.0.2", "mqttClientId=zentrale1", "zentrale2=172.16.1.2", "zentrale3=172.16.1.3"]
erzeuger1:
image: erzeuger4:latest
networks:
- backend
restart: "no"
command: [ "ip=172.16.1.1", "port=5000", "type=Solar", "name=Sunpower", "id=201", "size=591", "communication=MQTT", "brokerIp=172.16.0.2", "brokerChannel=zentrale1" ]
verbraucher1:
image: verbraucher4:latest
networks:
- backend
restart: "no"
command: [ "ip=172.16.1.1", "port=5000", "type=Unternehmen", "name=FamilyCompany", "id=101", "communication=MQTT", "brokerIp=172.16.0.2", "brokerChannel=zentrale1" ]
zentrale2:
image: zentrale4:latest
networks:
backend:
ipv4_address: 172.16.1.2
restart: "no"
command: [ "mqttServerAddress=172.16.0.2", "mqttClientId=zentrale2", "zentrale1=172.16.1.1", "zentrale3=172.16.1.3" ]
erzeuger2:
image: erzeuger4:latest
networks:
- backend
restart: "no"
command: ["ip=172.16.1.1", "port=5000", "type=Atom", "name=ATOOOOOOM", "id=204", "size=1000000.5", "communication=MQTT", "brokerIp=172.16.0.2", "brokerChannel=zentrale2" ]
verbraucher2:
image: verbraucher4:latest
networks:
- backend
restart: "no"
command: [ "ip=172.16.1.2", "port=5000", "type=Unternehmen", "name=otherCorp", "id=102", "communication=MQTT", "brokerIp=172.16.0.2", "brokerChannel=zentrale2" ]
zentrale3:
image: zentrale4:latest
networks:
backend:
ipv4_address: 172.16.1.3
restart: "no"
command: [ "mqttServerAddress=172.16.0.2", "mqttClientId=zentrale3", "zentrale1=172.16.1.1", "zentrale2=172.16.1.2" ]
erzeuger3:
image: erzeuger4:latest
networks:
- backend
restart: "no"
command: [ "ip=172.16.1.3", "port=5000", "type=Wind", "name=Windero", "id=203", "size=777", "communication=MQTT", "brokerIp=172.16.0.2", "brokerChannel=zentrale3" ]
verbraucher3:
image: verbraucher4:latest
networks:
- backend
restart: "no"
command: ["ip=172.16.1.3", "port=5000", "type=Unternehmen", "name=boringComp", "id=103", "communication=MQTT", "brokerIp=172.16.0.2", "brokerChannel=zentrale3" ]
energieversorger1:
image: energieversorger:latest
networks:
- backend
restart: "no"
command: ["ip=172.16.1.1"]
mqtt:
image: eclipse-mosquitto
restart: "no"
volumes:
- ${PWD}/mosquitto/mosquitto.conf:/mosquitto/config/mosquitto.conf
ports:
- 1883:1883
networks:
backend:
ipv4_address: 172.16.0.2
networks:
backend:
driver: bridge
ipam:
driver: default
config:
- subnet: 172.16.0.0/16
ip_range: 172.16.2.0/24
gateway: 172.16.0.1