-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
229 lines (215 loc) · 5.99 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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
version: "3.8"
services:
publisher-agent:
container_name: publisher-agent
hostname: publisher-agent
build:
context: publisher-agent/.
volumes:
- ./publisher-agent/src:/publisher-agent/src
environment:
- SLEEP_TIME=0
- PROTOCOL=MQTT # Must be set to AMQP or MQTT
- AMQP_QUEUE_HOST=rmq0
- AMQP_QUEUE_PORT=5672
- MQTT_QUEUE_HOST=mosquitto
- MQTT_QUEUE_PORT=1883
- TOPIC=/5jggokgpepnvsb2uv4s40d59ov/tag001/attrs
ports:
- 8053:8053
networks:
- default
synthetic-data-generator-file:
container_name: csv-data-sender
hostname: csv-data-sender
build:
context: synthetic-data-generator/.
depends_on:
- publisher-agent
volumes:
- ./synthetic-data-generator:/synthetic-data-generator
environment:
- SOCK_LISTENER_HOST=publisher-agent
- SOCK_LISTENER_PORT=8053
- SLEEP_TIME=0.9
networks:
- default
mosquitto:
image: eclipse-mosquitto:1.6.14
hostname: mosquitto
container_name: mosquitto
restart: always
expose:
- "1883"
- "9001"
ports:
- "1883:1883"
- "9001:9001"
volumes:
- ./mosquitto/mosquitto.conf:/mosquitto/config/mosquitto.conf
networks:
- default
iotagent-json:
image: fiware/iotagent-json:${IOT_AGENT_JSON_VERSION}
hostname: iotagent-json
container_name: iotagent-json
restart: always
depends_on:
- mongo-db
- mosquitto
expose:
- "${IOTA_NORTH_PORT}"
- "${IOTA_SOUTH_PORT}"
ports:
- "${IOTA_NORTH_PORT}:${IOTA_NORTH_PORT}" # localhost:4041
- "${IOTA_SOUTH_PORT}:${IOTA_SOUTH_PORT}" # localhost:7896
environment:
- IOTA_CB_HOST=orion # name of the context broker to update context
- IOTA_CB_PORT=${ORION_PORT} # port the context broker listens on to update context
- IOTA_NORTH_PORT=${IOTA_NORTH_PORT}
- IOTA_REGISTRY_TYPE=mongodb #Whether to hold IoT device info in memory or in a database
- IOTA_MONGO_HOST=mongo-db # The host name of MongoDB
- IOTA_MONGO_PORT=${MONGO_DB_PORT} # The port mongoDB is listening on
- IOTA_MONGO_DB=iotagent-json # The name of the database used in mongoDB
- IOTA_LOG_LEVEL=DEBUG # The log level of the IoT Agent
- IOTA_TIMESTAMP=true # Supply timestamp information with each measurement
- IOTA_CB_NGSI_VERSION=v2 # use NGSIv2 when sending updates for active attributes
- IOTA_AUTOCAST=true
- IOTA_MQTT_PORT=${IOTA_NORTH_PORT} # The port the MQTT Broker is listening on to receive topics
- IOTA_HTTP_PORT=${IOTA_SOUTH_PORT}
- IOTA_PROVIDER_URL=http://iotagent-json:${IOTA_NORTH_PORT}
- IOTA_DEFAULT_TRANSPORT=MQTT
- IOTA_MQTT_HOST=mosquitto # The host name of the MQTT Broker
- IOTA_DEFAULT_RESOURCE= # Default is blank. I'm using MQTT so I don't need a resource
- IOTA_MQTT_PORT=1883 # The port the MQTT Broker is listening on to receive topics
healthcheck:
interval: 5s
networks:
- default
mongo-db:
image: mongo:${MONGO_DB_VERSION}
hostname: mongo-db
container_name: mongo-db
restart: always
expose:
- "${MONGO_DB_PORT}"
ports:
- "${MONGO_DB_PORT}:${MONGO_DB_PORT}"
volumes:
- mongo-db:/data
healthcheck:
test: |
host=`hostname --ip-address || echo '127.0.0.1'`;
mongo --quiet $host/test --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 2)' && echo 0 || echo 1
interval: 5s
networks:
- default
mongo-express:
image: mongo-express
container_name: mongo-express
restart: always
ports:
- "28081:8081"
environment:
ME_CONFIG_MONGODB_URL: mongodb://mongo-db:27017"
depends_on:
- mongo-db
networks:
- default
orion:
image: fiware/orion:${ORION_VERSION}
hostname: orion
container_name: orion
restart: always
depends_on:
- mongo-db
expose:
- "${ORION_PORT}"
ports:
- "${ORION_PORT}:${ORION_PORT}"
command: -dbhost mongo-db -logLevel DEBUG
healthcheck:
test: curl --fail -s http://orion:${ORION_PORT}/version || exit 1
interval: 5s
networks:
- default
quantumleap:
image: orchestracities/quantumleap:${QUANTUMLEAP_VERSION}
hostname: quantumleap
restart: always
container_name: quantumleap
ports:
- "${QUANTUMLEAP_PORT}:${QUANTUMLEAP_PORT}"
depends_on:
- crate-db
environment:
- CRATE_HOST=crate-db
- LOGLEVEL=DEBUG
healthcheck:
test: curl --fail -s http://quantumleap:${QUANTUMLEAP_PORT}/version || exit 1
networks:
- default
crate-db:
image: crate:5.1.0
hostname: crate-db
container_name: db-crate
restart: always
ports:
- "4200:4200" #admin UI
- "4300:4300" #Transport protocol
command: crate -Cauth.host_based.enabled=false -Ccluster.name=democluster -Chttp.cors.enabled=true -Chttp.cors.allow-origin="*"
environment:
- CRATE_HEAP_SIZE=2g
volumes:
- crate-db:/data
networks:
- default
api-crate:
hostname: api-crate
container_name: api-crate
build:
context: api-crate/.
restart: always
depends_on:
- crate-db
environment:
- CRATE_HOST_PORT=crate-db:4200
- MONGODB_URI=mongodb://mongo-d
ports:
- "8080:8080"
volumes:
- ./api-crate:/app
networks:
- default
nginx:
image: nginx:1.18.0
depends_on:
- api-crate
ports:
- "4430:8080"
volumes:
- ./nginx/certs:/certs
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
restart: always
networks:
- default
swagger:
hostname: swagger
container_name: swagger
image: swaggerapi/swagger-ui:v4.6.1
restart: always
depends_on:
- api-crate
ports:
- 8081:8080
environment:
SWAGGER_JSON: /home/swagger.json
LAYOUT: "BaseLayout"
volumes:
- ./swagger/swagger.json:/home/swagger.json
networks:
- default
volumes:
mongo-db: ~
crate-db: ~
grafana: ~