22 lines
697 B
Bash
22 lines
697 B
Bash
#!/usr/bin/env bash
|
|
set -e
|
|
|
|
echo "Building images..."
|
|
docker build -t notes-backend:latest ./backend
|
|
docker build -t notes-frontend:latest ./frontend
|
|
|
|
# Load images into the cluster node (minikube or kind)
|
|
if command -v minikube &>/dev/null; then
|
|
echo "Loading images into minikube..."
|
|
minikube image load notes-backend:latest
|
|
minikube image load notes-frontend:latest
|
|
elif command -v kind &>/dev/null; then
|
|
echo "Loading images into kind..."
|
|
kind load docker-image notes-backend:latest
|
|
kind load docker-image notes-frontend:latest
|
|
else
|
|
echo "Warning: neither minikube nor kind detected. Make sure the cluster can access local images."
|
|
fi
|
|
|
|
echo "Done. Run ./start-app.sh to deploy."
|