-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathrun.sh
50 lines (50 loc) · 1.04 KB
/
run.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
45
46
47
48
49
50
#!/bin/bash
echo Stopping PM2 Processes
pm2 reset all
pm2 stop all
echo Stopping all existing Docker containers
docker kill $(docker ps -aq)
docker-compose -f linux.yml up -d
cd backend/skelm
echo Would you like to run tests? y or n
read os
if [ $os = "y" ]
then
echo Running tests!
npm run test
cd ..
elif [ $os = "n" ]
then
echo Fair enough Cowboy
else
echo You have entered an incorrect command. Nothing is happening...
fi
echo Would you like to seed Data?
read os
if [ $os = "y" ]
then
echo Seeding Now!
prisma seed
elif [ $os = "n" ]
then
echo Awesome, no need for a fresh data load
else
echo You have entered an incorrect command. Nothings gonna happen...
fi
npm install
echo Are there any schema changes?
read os
if [ $os = "y" ]
then
echo Seeding Now!
npm run prisma-deploy:dev
elif [ $os = "n" ]
then
echo Awesome, no need for a fresh schema load
else
echo You have entered an incorrect command. Nothings gonna happen...
fi
pm2 start skelm-pm2.json
echo Now to start the frontend
cd ../frontend
npm install && npm run start