From 8f6178e0572500ab958505fb340d9a1417746ed7 Mon Sep 17 00:00:00 2001 From: Brazing Technology Date: Wed, 29 Apr 2026 11:30:04 +0530 Subject: [PATCH] =?UTF-8?q?feat(scripts):=20start-app.sh=20=E2=80=94=20app?= =?UTF-8?q?ly=20all=20manifests,=20open=20browser?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- start-app.sh | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 start-app.sh diff --git a/start-app.sh b/start-app.sh new file mode 100644 index 0000000..e92ead5 --- /dev/null +++ b/start-app.sh @@ -0,0 +1,37 @@ +#!/usr/bin/env bash +set -euo pipefail + +echo "[start-app] Starting Task Manager on Kubernetes..." + +# Note: this script assumes ./prepare-app.sh has already been run successfully +# (images built into minikube, hostPath dir created, PV applied). Re-applying +# the prepare-stage manifests below is idempotent and safe, but does NOT build +# images or create the hostPath dir. Without prepare-app.sh, pods will fail with +# ImagePullBackOff. + +echo "[start-app] Applying namespace.yaml..." +kubectl apply -f namespace.yaml + +echo "[start-app] Applying statefulset.yaml..." +kubectl apply -f statefulset.yaml + +echo "[start-app] Applying service.yaml..." +kubectl apply -f service.yaml + +echo "[start-app] Applying deployment.yaml..." +kubectl apply -f deployment.yaml + +# Wait for everything to become ready +echo "[start-app] Waiting for db StatefulSet..." +kubectl -n taskapp rollout status statefulset/db --timeout=180s + +echo "[start-app] Waiting for api Deployment..." +kubectl -n taskapp rollout status deployment/api --timeout=180s + +echo "[start-app] Waiting for web Deployment..." +kubectl -n taskapp rollout status deployment/web --timeout=180s + +echo "" +echo "[start-app] App is running!" +echo "[start-app] Opening browser at the web service URL..." +minikube service web -n taskapp