-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
44 lines (38 loc) · 787 Bytes
/
setup.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
START_CRAWLER='n'
END_CRAWLER='n'
START_VUE_APP='n'
if [ $# -eq 0 ]
then
echo "Please add command"
else
for arg in "$@"
do
if [ "$arg" == '-up' ] || [ "$arg" == '-r' ]
then
START_CRAWLER='y'
echo "Start Web Crawler"
elif [ "$arg" == '-down' ] || [ "$arg" == '-d' ]
then
END_CRAWLER='y'
echo "End Web Crawler"
elif [ "$arg" == '-vue' ] || [ "$arg" == '-fe' ]
then
START_VUE_APP='y'
fi
done
fi
if [ $START_CRAWLER == 'y' ]
then
docker-compose build --no-cache
docker-compose up -d
fi
if [ $END_CRAWLER == 'y' ]
then
docker-compose down --rmi all -v
fi
if [ $START_VUE_APP == 'y' ]
then
cd crawler-app
npm install
npm run dev
fi