28 lines
733 B
Bash
Executable File
28 lines
733 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
minikube status | grep -q "Running" && START_MINIKUBE=false || START_MINIKUBE=true
|
|
|
|
$START_MINIKUBE && minikube start
|
|
$START_MINIKUBE && eval $(minikube docker-env)
|
|
|
|
read -p "Do you want to run Postgres with a specific version? [y/N]: " answer
|
|
|
|
if [ "$answer" == "y" ] || [ "$answer" == "Y" ]; then
|
|
read -p "Enter the Postgres version: " version
|
|
./build.sh -b -v "${version}"
|
|
sed -ni "/repository: db/ {
|
|
p;
|
|
n;
|
|
/tag:.*/ {
|
|
s/tag:.*/tag: ${version}/;
|
|
p;
|
|
d;
|
|
}
|
|
}
|
|
p;" helm/values.yaml
|
|
fi
|
|
|
|
$START_MINIKUBE && minikube addons enable ingress
|
|
|
|
helm status exam > /dev/null 2>&1 && helm upgrade exam ./helm || helm install exam ./helm
|