ZKT26/Z2/z2/prepare-app.sh

21 lines
577 B
Bash

#!/bin/bash
set -e
echo "==> Building Docker image for notes-web..."
docker build -t notes-web:latest ./app
echo "==> Loading image into Minikube (if using Minikube)..."
if command -v minikube &>/dev/null; then
minikube image load notes-web:latest
echo " Image loaded into Minikube."
else
echo " Minikube not found, skipping image load."
fi
echo "==> Creating host directory for PersistentVolume..."
sudo mkdir -p /mnt/notes-postgres-data
sudo chmod 777 /mnt/notes-postgres-data
echo ""
echo "Preparation complete. Run ./start-app.sh to start the application."