File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,21 @@ services:
35
35
healthcheck :
36
36
test : (wget --server-response --spider --quiet http://context/user-context.jsonld 2>&1 | awk 'NR==1{print $$2}'| grep -q -e "200") || exit 1
37
37
38
+ # Cache for Sensor Data Readings
39
+ redis-sensors :
40
+ labels :
41
+ org.fiware : ' tutorial'
42
+ image : redis:8.2.0-alpine
43
+ container_name : redis
44
+ hostname : redis-for-sensors
45
+ ports :
46
+ - " 6379:6379"
47
+ volumes :
48
+ - redis-data:/data
49
+ healthcheck :
50
+ test : ["CMD", "redis-cli","ping"]
51
+ interval : 10s
52
+
38
53
# Databases
39
54
mongo-db :
40
55
labels :
@@ -127,6 +142,8 @@ services:
127
142
image : quay.io/fiware/tutorials.iot-devices
128
143
hostname : iot-sensors
129
144
container_name : fiware-iot-devices
145
+ depends_on :
146
+ - redis-sensors
130
147
networks :
131
148
- default
132
149
expose :
@@ -141,6 +158,7 @@ services:
141
158
- IOTA_HTTP_PORT=${IOTA_SOUTH_PORT}
142
159
- PIG_COUNT=${PIG_COUNT}
143
160
- COW_COUNT=${COW_COUNT}
161
+ - REDIS_HOST=redis-for-sensors
144
162
145
163
# Tutorial acts as a Farm Management Information System
146
164
tutorial :
@@ -179,6 +197,7 @@ networks:
179
197
volumes :
180
198
mongo-db : ~
181
199
mongo-config : ~
200
+ redis-data : ~
182
201
data-models :
183
202
driver : local
184
203
driver_opts :
You can’t perform that action at this time.
0 commit comments