#!/usr/bin/env bash # prepare-app.sh — Re-deploy TaskFlow to Azure App Service # Run setup.sh for first-time deployment. # Use this to rebuild and redeploy the container after code changes. set -euo pipefail source "$(dirname "${BASH_SOURCE[0]}")/.env" RG="taskflow-rg" ACR_NAME="taskflowregistry26900" APP_NAME="taskflow-14802" SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" echo "Rebuilding and redeploying TaskFlow..." az acr login --name "${ACR_NAME}" docker build -t "${ACR_NAME}.azurecr.io/taskflow-web:latest" "${SCRIPT_DIR}/app" docker push "${ACR_NAME}.azurecr.io/taskflow-web:latest" az webapp restart --resource-group "${RG}" --name "${APP_NAME}" --output none echo "Done. App is live at: https://${APP_NAME}.azurewebsites.net"