-
Notifications
You must be signed in to change notification settings - Fork 0
/
dc
executable file
·38 lines (30 loc) · 987 Bytes
/
dc
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
#! /bin/sh
SCRIPT_PATH=$(dirname $(realpath $0))
FILE="${SCRIPT_PATH}/${1}.yml"
case "$2" in
start)
docker-compose --file $FILE --env-file /mutualis-data/env up -d
;;
stop)
docker-compose --file $FILE --env-file /mutualis-data/env stop
;;
restart)
docker-compose --file $FILE --env-file /mutualis-data/env restart
;;
status)
docker-compose --file $FILE --env-file /mutualis-data/env ps
;;
remove)
docker-compose --file $FILE --env-file /mutualis-data/env stop
docker-compose --file $FILE --env-file /mutualis-data/env rm -f
;;
update)
docker-compose --file $FILE --env-file /mutualis-data/env pull
docker-compose --file $FILE --env-file /mutualis-data/env up -d --remove-orphans
docker image prune
;;
*)
echo "Usage: dc {admin|cloud|media|web|backup|gateway|drive...} {start|stop|restart|status|remove|update}"
exit 1
esac
exit 0