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:
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 foe 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 :
@@ -120,6 +135,8 @@ services:
120135 image : quay.io/fiware/tutorials.iot-devices
121136 hostname : iot-sensors
122137 container_name : fiware-iot-devices
138+ depends_on :
139+ - redis-sensors
123140 networks :
124141 - default
125142 expose :
@@ -132,6 +149,7 @@ services:
132149 - WEB_APP_PORT=${TUTORIAL_APP_PORT} # Port used by the content provider proxy and web-app for viewing data
133150 - IOTA_HTTP_HOST=iot-agent
134151 - IOTA_HTTP_PORT=${IOTA_SOUTH_PORT}
152+ - REDIS_HOST=redis-for-sensors
135153
136154 # Tutorial acts as a Farm Management Information System
137155 tutorial :
@@ -219,6 +237,7 @@ networks:
219237volumes :
220238 mongo-db : ~
221239 mongo-config : ~
240+ redis-data : ~
222241 data-models :
223242 driver : local
224243 driver_opts :
You can’t perform that action at this time.
0 commit comments