-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy.sh
33 lines (26 loc) · 835 Bytes
/
deploy.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
echo "deploy frontend? yes/no "
read deploy_frontend
echo "deploy backend? yes/no "
read deploy_backend
if [ "$deploy_backend" = "yes" ]; then
echo "deploying backend"
kubectl delete deployment taskmanager-deployment
minikube image rm taskmanager
sudo docker build . -t taskmanager
minikube image load taskmanager
fi
if [ "$deploy_frontend" = "yes" ]; then
echo "deploying frontend"
kubectl delete deployment frontend-deployment
minikube image rm frontend-taskmanager
sudo docker build frontend/taskmanager -t frontend-taskmanager
minikube image load frontend-taskmanager
fi
kubectl apply -f mysql-deployment.yaml
sleep 25
if [ "$deploy_backend" = "yes" ]; then
kubectl apply -f taskmanager-deployment.yaml
fi
if [ "$deploy_frontend" = "yes" ]; then
kubectl apply -f frontend/taskmanager/frontend-deployment.yaml
fi