@@ -35,7 +35,22 @@ 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- # Databases
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+
53+ # Databases
3954 mongo-db :
4055 labels :
4156 org.fiware : ' tutorial'
@@ -55,7 +70,7 @@ services:
5570 test : ["CMD","mongosh", "localhost:27017/test", "--quiet"]
5671 interval : 5s
5772
58- # IoT-Agent is configured for the UltraLight Protocol
73+ # IoT-Agent is configured for the JSON Protocol
5974 iot-agent :
6075 labels :
6176 org.fiware : ' tutorial'
@@ -97,6 +112,32 @@ services:
97112 healthcheck :
98113 interval : 30s
99114
115+
116+ # A series of dummy IoT Sensors over HTTP
117+ iot-sensors :
118+ labels :
119+ org.fiware : ' tutorial'
120+ image : quay.io/fiware/tutorials.iot-devices
121+ hostname : iot-sensors
122+ container_name : fiware-iot-devices
123+ depends_on :
124+ - redis-sensors
125+ networks :
126+ - default
127+ expose :
128+ - " ${TUTORIAL_DUMMY_DEVICE_PORT}"
129+ ports :
130+ - " ${TUTORIAL_DUMMY_DEVICE_PORT}:${TUTORIAL_DUMMY_DEVICE_PORT}" # localhost:3001
131+ environment :
132+ - DEBUG=devices:*
133+ - WEB_APP_HOST=tutorial
134+ - WEB_APP_PORT=${TUTORIAL_APP_PORT} # Port used by the content provider proxy and web-app for viewing data
135+ - IOTA_HTTP_HOST=iot-agent
136+ - IOTA_HTTP_PORT=${IOTA_SOUTH_PORT}
137+ - IOTA_DEFAULT_RESOURCE=/iot/json
138+ - REDIS_HOST=redis-for-sensors
139+ - DUMMY_DEVICES_PAYLOAD=JSON
140+
100141 # Tutorial acts as a Farm Management Information System
101142 tutorial :
102143 labels :
@@ -132,6 +173,7 @@ networks:
132173volumes :
133174 mongo-db : ~
134175 mongo-config : ~
176+ redis-data : ~
135177 data-models :
136178 driver : local
137179 driver_opts :
0 commit comments