-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.sh
45 lines (27 loc) · 792 Bytes
/
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
#!/bin/bash
[ -z $1 ] && echo "USAGE: $0 d(ocker) | g(ateway) | h(ttpserv) | b(oth)" && exit 1
rm -rf /app
mkdir -p /app
cp -rT /vagrant /app
cd /app
if [[ $1 == "d" ]]; then
docker-compose down
docker stop $(docker ps -a -q)
docker kill $(docker ps -a -q)
docker rm $(docker ps -a -q)
docker-compose build --no-cache && \
docker-compose up
else
dotnet restore
dotnet clean
dotnet build
if [[ $1 == "g" ]]; then
dotnet run --project src/ApiGateway/ApiGateway.csproj
elif [[ $1 == "h" ]]; then
dotnet run --project src/HttpServ/HttpServ.csproj
elif [[ $1 == "b" ]]; then
trap "trap - SIGTERM && kill -- -$$" SIGINT SIGTERM EXIT
dotnet run --project src/HttpServ/HttpServ.csproj > /dev/null &
dotnet run --project src/ApiGateway/ApiGateway.csproj
fi
fi