-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgo
More file actions
47 lines (39 loc) · 1.12 KB
/
Copy pathgo
File metadata and controls
47 lines (39 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/bash
target_up() {
echo "Creating and starting the systems required for $1"
cd $1
docker-compose up -d --build
}
target_up-force() {
echo "Creating and starting the systems required for $1 in force mode"
cd $1
docker-compose up -d --build --force-recreate
}
target_down() {
echo "Stopping the systems required for $1"
cd $1
docker-compose kill
}
target_remove() {
echo "Stopping and removing the systems required for $1"
cd $1
docker-compose down
}
target_ps() {
echo "Listing the process state of the systems required for $1"
cd $1
docker-compose ps
}
if type -t "target_$1" &>/dev/null; then
target_$1 ${@:2}
else
echo "usage: $0 <target>
target:
up <servicename> -- Starts all the containers of a compose
up-force <servicename> -- Force starts/restarts all the containers of a compose
down <servicename> -- Stops all the containers of a compose
remove <servicename> -- Stops and removes all the containers of a compose
ps <servicename> -- Lists the status of all the containers of a compose
"
exit 1
fi