-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommand.sh
More file actions
executable file
·64 lines (60 loc) · 901 Bytes
/
command.sh
File metadata and controls
executable file
·64 lines (60 loc) · 901 Bytes
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
function show_help() {
printf "
Usage:
$ ./command.sh COMMAND [COMMAND_ARGS...]
commands:
* build
* up
* down
* stop
* restart
* install
* start
* debug
* npx
"
}
function command_docker() {
COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 \
docker-compose -f docker-compose.yml "$@"
}
case "$1" in
build)
shift
command_docker build "$@"
;;
up)
shift
command_docker up "$@"
;;
down)
shift
command_docker down "$@"
;;
stop)
shift
command_docker stop "$@"
;;
restart)
shift
command_docker restart "$@"
;;
install)
shift
command_docker run --rm webpack_cli npm install "$@"
;;
npx)
shift
command_docker run --rm webpack npx "$@"
;;
start)
shift
command_docker run --rm webpack npm start "$@"
;;
debug)
shift
command_docker run --rm webpack npm dev:debug "$@"
;;
*)
show_help
esac