feat: Overhaul Docker infrastructure with multi-stage builds, add a cleanup script, and refactor the update service to combine update and requirement checks.

This commit is contained in:
syntaxbullet
2026-01-17 16:20:33 +01:00
parent d7543d9f48
commit 17e636c4e5
9 changed files with 496 additions and 214 deletions

View File

@@ -0,0 +1,41 @@
#!/bin/bash
# Cleanup script for Docker resources
# Use: ./shared/scripts/docker-cleanup.sh
set -e
echo "🧹 Aurora Docker Cleanup"
echo "========================"
# Stop running containers for this project
echo ""
echo "📦 Stopping Aurora containers..."
docker compose down 2>/dev/null || true
# Remove dangling images (untagged images from failed builds)
echo ""
echo "🗑️ Removing dangling images..."
docker image prune -f
# Optional: Remove unused build cache
echo ""
read -p "🔧 Remove Docker build cache? (y/N): " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
docker builder prune -f
echo "✓ Build cache cleared"
fi
# Optional: Remove node_modules volumes (forces fresh install)
echo ""
read -p "📁 Remove node_modules volumes? (forces fresh install) (y/N): " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
docker volume rm aurora_app_node_modules aurora_web_node_modules 2>/dev/null || true
echo "✓ Node modules volumes removed"
fi
echo ""
echo "✅ Cleanup complete!"
echo ""
echo "Run 'docker compose up --build' to rebuild"