File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,21 @@ services:
3535 healthcheck :
3636 test : (wget --server-response --spider --quiet http://context/user-context.jsonld 2>&1 | awk 'NR==1{print $$2}'| grep -q -e "200") || exit 1
3737
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+
3853 # Databases
3954 mongo-db :
4055 labels :
@@ -93,7 +108,6 @@ services:
93108 - IOTA_MULTI_CORE=true
94109 healthcheck :
95110 interval : 10s
96-
97111
98112 farmer :
99113 labels :
@@ -126,6 +140,8 @@ services:
126140 image : quay.io/fiware/tutorials.iot-devices
127141 hostname : iot-sensors
128142 container_name : fiware-iot-devices
143+ depends_on :
144+ - redis-sensors
129145 networks :
130146 - default
131147 expose :
@@ -144,6 +160,7 @@ services:
144160 - DUMMY_DEVICES_TRANSPORT=HTTP # Default transport used by dummy Io devices
145161 - DUMMY_DEVICES_API_KEY=4jggokgpepnvsb2uv4s40d59ov
146162 - DUMMY_DEVICES_PAYLOAD=JSON
163+ - REDIS_HOST=redis-for-sensors
147164
148165
149166 # Tutorial acts as a Farm Management Information System
@@ -184,6 +201,7 @@ networks:
184201volumes :
185202 mongo-db : ~
186203 mongo-config : ~
204+ redis-data : ~
187205 data-models :
188206 driver : local
189207 driver_opts :
You can’t perform that action at this time.
0 commit comments