File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1616#
1717# see: https://github.com/FIWARE/helm-charts/
1818#
19- version : " 3.5 "
19+ version : " 3.8 "
2020services :
2121 # Orion is the context broker
2222 orion :
23+ labels :
24+ org.fiware : ' tutorial'
2325 image : fiware/orion:${ORION_VERSION}
2426 container_name : fiware-orion
2527 depends_on :
@@ -36,6 +38,8 @@ services:
3638 interval : 5s
3739 # Keyrock is an Identity Management Front-End
3840 keyrock :
41+ labels :
42+ org.fiware : ' tutorial'
3943 image : fiware/idm:${KEYROCK_VERSION}
4044 container_name : fiware-keyrock
4145 hostname : keyrock
@@ -70,6 +74,8 @@ services:
7074
7175 # Tutorial acts as a series of dummy IoT Sensors over HTTP
7276 tutorial :
77+ labels :
78+ org.fiware : ' tutorial'
7379 image : fiware/tutorials.context-provider
7480 hostname : iot-sensors
7581 container_name : fiware-tutorial
@@ -116,6 +122,8 @@ services:
116122
117123 # Databases
118124 mongo-db :
125+ labels :
126+ org.fiware : ' tutorial'
119127 image : mongo:${MONGO_DB_VERSION}
120128 hostname : mongo-db
121129 container_name : db-mongo
@@ -136,6 +144,8 @@ services:
136144
137145 mysql-db :
138146 restart : always
147+ labels :
148+ org.fiware : ' tutorial'
139149 image : mysql:${MYSQL_DB_VERSION}
140150 hostname : mysql-db
141151 container_name : db-mysql
@@ -157,6 +167,8 @@ services:
157167
158168networks :
159169 default :
170+ labels :
171+ org.fiware : ' tutorial'
160172 ipam :
161173 config :
162174 - subnet : 172.18.1.0/24
Original file line number Diff line number Diff line change @@ -54,15 +54,20 @@ startContainers () {
5454}
5555
5656stoppingContainers () {
57- CONTAINERS=$( docker ps -aq)
57+ CONTAINERS=$( docker ps --filter " label=org.fiware=tutorial " - aq)
5858 if [[ -n $CONTAINERS ]]; then
5959 echo " Stopping containers"
60- docker rm -f $CONTAINERS
60+ docker rm -f $CONTAINERS || true
6161 fi
6262 VOLUMES=$( docker volume ls -qf dangling=true)
6363 if [[ -n $VOLUMES ]]; then
6464 echo " Removing old volumes"
65- docker volume rm $VOLUMES
65+ docker volume rm $VOLUMES || true
66+ fi
67+ NETWORKS=$( docker network ls --filter " label=org.fiware=tutorial" -q)
68+ if [[ -n $NETWORKS ]]; then
69+ echo " Removing tutorial networks"
70+ docker network rm $NETWORKS || true
6671 fi
6772}
6873
You can’t perform that action at this time.
0 commit comments