forked from team-HF/HF_backend
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdockerize.sh
More file actions
23 lines (18 loc) · 685 Bytes
/
dockerize.sh
File metadata and controls
23 lines (18 loc) · 685 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
BUILD_POSITION=$1
MODE=$2
# docker container stop hf-backend-app || true
# docker container rm hf-backend-app || true
if [ "$MODE" = "no-auth" ]; then
docker-compose -f docker-compose.yml --env-file envs --profile blue-noauth down --rmi all
else
docker-compose -f docker-compose.yml --env-file envs --profile blue down --rmi all
fi
if [ "$BUILD_POSITION" = "no-container" ]; then
./gradlew clean build -x test
fi
docker build -t rudeh1253/hf-backend:latest .
if [ "$MODE" = "no-auth" ]; then
docker-compose -f docker-compose.yml --env-file envs --profile blue-noauth up -d --build
else
docker-compose -f docker-compose.yml --env-file envs --profile blue up -d --build
fi