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 :
@@ -63,6 +78,8 @@ services:
63
78
image : quay.io/fiware/tutorials.iot-devices
64
79
hostname : iot-sensors
65
80
container_name : fiware-iot-devices
81
+ depends_on :
82
+ - redis-sensors
66
83
networks :
67
84
- default
68
85
expose :
@@ -75,6 +92,7 @@ services:
75
92
- WEB_APP_PORT=${TUTORIAL_APP_PORT} # Port used by the content provider proxy and web-app for viewing data
76
93
- IOTA_HTTP_HOST=iot-agent
77
94
- IOTA_HTTP_PORT=${IOTA_SOUTH_PORT}
95
+ - REDIS_HOST=redis-for-sensors
78
96
79
97
# Tutorial acts as a Farm Management Information System
80
98
tutorial :
@@ -112,6 +130,7 @@ networks:
112
130
volumes :
113
131
mongo-db : ~
114
132
mongo-config : ~
133
+ redis-data : ~
115
134
data-models :
116
135
driver : local
117
136
driver_opts :
You can’t perform that action at this time.
0 commit comments