File tree Expand file tree Collapse file tree 2 files changed +11
-8
lines changed Expand file tree Collapse file tree 2 files changed +11
-8
lines changed Original file line number Diff line number Diff line change 28
28
./services create || true
29
29
- name : Run Script
30
30
run : |
31
- ./services start && ./services stop
31
+ ./services start test && ./services stop test
Original file line number Diff line number Diff line change 2
2
#
3
3
# Command Line Interface to start all services associated with the Getting-Started Tutorial
4
4
#
5
- # For this tutorial the commands are merely a convenience script to run docker-compose
6
- #
5
+ # For this tutorial the commands are merely a convenience script to run ${dockerCmd}#
7
6
8
7
set -e
9
8
10
- if (( $# != 1 )) ; then
11
- echo " Illegal number of parameters"
9
+ dockerCmd=" docker compose"
10
+ if (( $# == 2 )) ; then
11
+ dockerCmd=" docker-compose"
12
+ fi
13
+
14
+ if (( $# < 1 )) ; then echo " Illegal number of parameters"
12
15
echo " usage: services [create|start|stop]"
13
16
exit 1
14
17
fi
@@ -23,7 +26,7 @@ loadData () {
23
26
24
27
stoppingContainers () {
25
28
echo " Stopping running containers"
26
- docker-compose down -v --remove-orphans
29
+ ${dockerCmd} down -v --remove-orphans
27
30
}
28
31
29
32
displayServices () {
@@ -107,7 +110,7 @@ case "${command}" in
107
110
echo -e " - \033[1;36mIoT-Agent\033[0m is configured for the UltraLight Protocol"
108
111
echo -e " - \033[1;30mTutorial\033[0m acts as a series of dummy IoT Sensors over HTTP"
109
112
echo " "
110
- docker-compose up -d --remove-orphans
113
+ ${dockerCmd} up -d --remove-orphans
111
114
waitForMongo
112
115
addDatabaseIndex
113
116
waitForOrion
@@ -123,7 +126,7 @@ case "${command}" in
123
126
export $( cat .env | grep " #" -v)
124
127
echo " Pulling Docker images"
125
128
docker pull curlimages/curl
126
- docker-compose pull
129
+ ${dockerCmd} pull
127
130
;;
128
131
* )
129
132
echo " Command not Found."
You can’t perform that action at this time.
0 commit comments