Initialize project and update portal port configuration
Set default portal port to 8081, fix Dart build issue in cart screen, and update setup documentation. Co-Authored-By: Oz <oz-agent@warp.dev>
This commit is contained in:
34
uninstall_portal.sh
Executable file
34
uninstall_portal.sh
Executable file
@ -0,0 +1,34 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -Eeuo pipefail
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
PROJECT_DIR="$SCRIPT_DIR"
|
||||
COMPOSE_FILE="$PROJECT_DIR/docker-compose.yml"
|
||||
ENV_FILE="$PROJECT_DIR/.env"
|
||||
FORCE=0
|
||||
|
||||
if [[ "${1:-}" == "--force" ]]; then
|
||||
FORCE=1
|
||||
fi
|
||||
|
||||
if [[ $FORCE -eq 0 ]]; then
|
||||
echo "WARNING: This will remove the Flutter portal containers, local images, and volumes for this project."
|
||||
read -r -p "Continue? [y/N]: " answer
|
||||
if [[ ! "$answer" =~ ^[Yy]$ ]]; then
|
||||
echo "Uninstall cancelled."
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -f "$COMPOSE_FILE" ]]; then
|
||||
if [[ -f "$ENV_FILE" ]]; then
|
||||
docker compose -f "$COMPOSE_FILE" --env-file "$ENV_FILE" down --remove-orphans --volumes --rmi local || true
|
||||
else
|
||||
docker compose -f "$COMPOSE_FILE" down --remove-orphans --volumes --rmi local || true
|
||||
fi
|
||||
fi
|
||||
|
||||
docker container rm -f flutter_ecommerce_portal_web >/dev/null 2>&1 || true
|
||||
|
||||
echo "Cleanup complete for flutter_ecommerce_portal."
|
||||
Reference in New Issue
Block a user