-
Notifications
You must be signed in to change notification settings - Fork 0
/
go.sh
44 lines (39 loc) · 668 Bytes
/
go.sh
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
#!/bin/bash
#author :blanco
#version :1.0
#Script to build the images and containers
if [ "$#" -eq "0" ]
then
help=true
fi
while [ $# -ne 0 ]
do
arg="$1"
case "$arg" in
run)
run=true
;;
compile)
compile=true
;;
--help)
help=true
;;
*)
;;
esac
shift
done
if [ "$help" == true ]; then
echo usage: sh go.sh [compile] [docker] [run]
echo arguments:
echo . compile - compile projects
echo . run - run containers
echo
fi
if [ "$compile" == true ]; then
(cd frontend && exec npm run build)
fi
if [ "$run" == true ]; then
(cd devops && exec docker-compose up frontend)
fi