File tree Expand file tree Collapse file tree 2 files changed +27
-6
lines changed Expand file tree Collapse file tree 2 files changed +27
-6
lines changed Original file line number Diff line number Diff line change 1
- version : " 3.5 "
1
+ version : " 3.8 "
2
2
services :
3
3
designer :
4
+ labels :
5
+ org.fiware : ' tutorial'
4
6
image : fogflow/designer:3.2
5
7
volumes :
6
8
- ./config.json:/app/config.json
@@ -14,6 +16,8 @@ services:
14
16
restart : always
15
17
16
18
discovery :
19
+ labels :
20
+ org.fiware : ' tutorial'
17
21
image : fogflow/discovery:3.2
18
22
volumes :
19
23
- ./config.json:/config.json
@@ -24,6 +28,8 @@ services:
24
28
restart : always
25
29
26
30
master :
31
+ labels :
32
+ org.fiware : ' tutorial'
27
33
image : fogflow/master:3.2
28
34
volumes :
29
35
- ./config.json:/config.json
@@ -39,6 +45,8 @@ services:
39
45
restart : always
40
46
41
47
cloud_broker :
48
+ labels :
49
+ org.fiware : ' tutorial'
42
50
image : fogflow/broker:3.2
43
51
volumes :
44
52
- ./config.json:/config.json
@@ -50,6 +58,8 @@ services:
50
58
restart : always
51
59
52
60
cloud_worker :
61
+ labels :
62
+ org.fiware : ' tutorial'
53
63
image : fogflow/worker:3.2
54
64
volumes :
55
65
- /tmp:/tmp
@@ -61,6 +71,8 @@ services:
61
71
restart : always
62
72
63
73
rabbitmq :
74
+ labels :
75
+ org.fiware : ' tutorial'
64
76
image : rabbitmq:3
65
77
ports :
66
78
- 5672:5672
@@ -69,7 +81,9 @@ services:
69
81
- RABBITMQ_DEFAULT_PASS=mypass
70
82
restart : always
71
83
72
- nginx :
84
+ nginx :
85
+ labels :
86
+ org.fiware : ' tutorial'
73
87
image : nginx:latest
74
88
volumes :
75
89
- ./nginx.conf:/etc/nginx/nginx.conf
@@ -81,7 +95,9 @@ services:
81
95
- designer
82
96
restart : always
83
97
84
- dgraph :
98
+ dgraph :
99
+ labels :
100
+ org.fiware : ' tutorial'
85
101
image : dgraph/standalone
86
102
volumes :
87
103
- ./dgraph:/dgraph
Original file line number Diff line number Diff line change 29
29
30
30
31
31
stoppingContainers () {
32
- CONTAINERS=$( docker ps -aq)
32
+ CONTAINERS=$( docker ps --filter " label=org.fiware=tutorial " - aq)
33
33
if [[ -n $CONTAINERS ]]; then
34
34
echo " Stopping containers"
35
- docker rm -f $CONTAINERS
35
+ docker rm -f $CONTAINERS || true
36
36
fi
37
37
VOLUMES=$( docker volume ls -qf dangling=true)
38
38
if [[ -n $VOLUMES ]]; then
39
39
echo " Removing old volumes"
40
- docker volume rm $VOLUMES
40
+ docker volume rm $VOLUMES || true
41
+ fi
42
+ NETWORKS=$( docker network ls --filter " label=org.fiware=tutorial" -q)
43
+ if [[ -n $NETWORKS ]]; then
44
+ echo " Removing tutorial networks"
45
+ docker network rm $NETWORKS || true
41
46
fi
42
47
}
43
48
You can’t perform that action at this time.
0 commit comments