-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvag-setup.sh
61 lines (48 loc) · 1.75 KB
/
vag-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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/usr/bin/env bash
echo "Coloring"
B='\033[0;34m'
sudo apt-get update
echo "Installing Git.."
sudo apt-get install -y git
git clone https://github.com/bortizf/microservice-app-example.git
cd microservice-app-example/
echo -e "${B}Compiling SpringBoot project..."
cd users-api/
./mvnw clean install
JWT_SECRET=PRFT SERVER_PORT=8083 java -jar target/users-api-0.0.1-SNAPSHOT.jar > log_usersApi.txt 2>&1 &
echo -e "${B}Compiling GOLANG project..."
cd ..
cd auth-api/
export GO111MODULE=on
go mod init github.com/bortizf/microservice-app-example/tree/master/auth-api
go mod tidy
go build
JWT_SECRET=PRFT AUTH_API_PORT=8000 USERS_API_ADDRESS=http://127.0.0.1:8083 ./auth-api > log_authApi.txt 2>&1 &
echo -e "${B}Running TODOS project..."
cd ..
cd todos-api/
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
. ~/.nvm/nvm.sh
nvm install 8.17
npm install
JWT_SECRET=PRFT TODO_API_PORT=8082 npm start > log_todos.txt 2>&1 &
echo -e "${B}Running FrontEnd project..."
cd ..
cd frontend/
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
. ~/.nvm/nvm.sh
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
nvm install 8.17
npm config set user 0
npm config set unsafe-perm true
npm install
npm run build
PORT=8080 AUTH_API_ADDRESS=http://127.0.0.1:8000 TODOS_API_ADDRESS=http://127.0.0.1:8082 npm start > log_frontEnd.txt 2>&1 &
echo -e "${B}Running Log Message processor project..."
cd ..
cd log-message-processor/
pip3 install -r requirements.txt
REDIS_HOST=127.0.0.1 REDIS_PORT=6379 REDIS_CHANNEL=log_channel python3 main.py > log_Logmessage_processor.txt 2>&1 &
echo -e "${B}JOBS RUNNING..."
jobs -l