Add Phase 2 deployment script

This commit is contained in:
2026-01-27 22:32:32 +11:00
parent 54d16bd553
commit 24b3f53f7c

61
deploy_phase2.sh Normal file
View File

@@ -0,0 +1,61 @@
#!/bin/bash
set -e
echo "🚀 Deploying Phase 2: Chore Management System"
echo "=============================================="
echo ""
echo "📥 Step 1: Pulling latest changes..."
git pull origin main
echo "✅ Changes pulled"
echo ""
echo "🛑 Step 2: Stopping existing containers..."
docker-compose down
echo "✅ Containers stopped"
echo ""
echo "🔨 Step 3: Rebuilding containers (this may take a few minutes)..."
docker-compose build --no-cache
echo "✅ Containers rebuilt"
echo ""
echo "🚀 Step 4: Starting services..."
docker-compose up -d
echo "✅ Services started"
echo ""
echo "⏳ Step 5: Waiting for services to initialize (15 seconds)..."
sleep 15
echo ""
echo "🔍 Step 6: Checking service health..."
echo ""
echo "Backend Health:"
curl -s http://localhost:8001/health | jq . || echo "Backend not responding yet"
echo ""
echo "Frontend Status:"
curl -s http://localhost:5173 > /dev/null && echo "✅ Frontend is responding" || echo "❌ Frontend not responding yet"
echo ""
echo "📊 Step 7: Checking running containers..."
docker-compose ps
echo ""
echo "=============================================="
echo "🎉 Deployment Complete!"
echo "=============================================="
echo ""
echo "📱 Access your Family Hub:"
echo " Frontend: http://localhost:5173"
echo " Backend API: http://localhost:8001"
echo " API Docs: http://localhost:8001/docs"
echo ""
echo "🔑 Login with:"
echo " Username: jess"
echo " Password: password123"
echo ""
echo "📖 See PHASE2_README.md for full documentation"
echo ""
echo "💡 Tip: If login doesn't work immediately, wait another minute"
echo " for the backend to fully initialize, then refresh the page."