#!/bin/bash echo "โš ๏ธ This will DELETE your containers, SQLite DB, Alembic migrations, cache, uploads, logs." read -p "Continue? (y/N): " confirm if [[ "$confirm" != "y" && "$confirm" != "Y" ]]; then echo "โŒ Aborted." exit 1 fi echo "๐Ÿ›‘ Stopping and removing containers and volumes..." docker compose down --volumes --remove-orphans echo "๐Ÿ—‘ Removing mounted DB file..." rm -f ./app/app.db echo "๐Ÿงน Removing Alembic migrations..." sudo rm -rf migrations/ echo "๐Ÿงผ Removing Python cache and compiled files..." sudo find . -type d -name '__pycache__' -exec rm -rf {} + sudo find . -name '*.pyc' -delete sudo find . -name '*.pyo' -delete echo "๐Ÿงฝ Removing static uploads and logs..." rm -rf app/static/uploads/* rm -rf logs/ echo "๐Ÿ”จ Rebuilding containers..." docker compose build --no-cache echo "๐Ÿš€ Starting up..." docker compose up --force-recreate