zkt21/sk1/start-app.sh

31 lines
1.2 KiB
Bash
Raw Normal View History

2021-05-24 17:48:55 +00:00
#!/bin/bash
#tento script pripravi a spusti vsetko, po jeho ukonceni je aplikacia beziaca a funkcna
#predpoklada sa ze kubectl a minikube su spustene
echo "*Starting setup*"
echo "*Deploying postgres*"
kubectl apply -f postgres-deployment.yaml
echo "*Deploying nginx*"
kubectl apply -f nginx-deployment.yaml
echo "*Deploying data*"
kubectl apply -f data-deployment.yaml
echo "*Deploying web*"
kubectl apply -f web-deployment.yaml
echo "*Deploying configmap*"
kubectl apply -f env-configmap.yaml
2021-05-24 20:01:34 +00:00
echo "*Done*"
docker tag postgres:latest registermato.azurecr.io/postgres:latest
docker push registermato.azurecr.io/postgres:latest
docker tag z2_nginx registermato.azurecr.io/z2_nginx
docker push registermato.azurecr.io/z2_nginx
docker tag z2_web registermato.azurecr.io/z2_web
docker push registermato.azurecr.io/z2_web
az container create --resource-group mrg --name mycontainer --image registermato.azurecr.io/z2_nginx:latest --dns-name-label mato-demo --ports 8080
az container create --resource-group mrg --name mycontainer2 --image registermato.azurecr.io/z2_web:latest --dns-name-label mato-demo2 --ports 80
az container create --resource-group mrg --name mycontainer3 --image registermato.azurecr.io/postgres:latest --dns-name-label mato-demo3 --ports 5432