Some checks failed
CI/CD Pipeline / Backend - Lint & Test (push) Has been cancelled
CI/CD Pipeline / Frontend - Lint & Test (push) Has been cancelled
CI/CD Pipeline / Security Scan (push) Has been cancelled
CI/CD Pipeline / Build Backend (push) Has been cancelled
CI/CD Pipeline / Build Frontend (push) Has been cancelled
CI/CD Pipeline / Integration Tests (push) Has been cancelled
CI/CD Pipeline / Deploy to Staging (push) Has been cancelled
CI/CD Pipeline / Deploy to Production (push) Has been cancelled
CI/CD Pipeline / Performance Tests (push) Has been cancelled
CI/CD Pipeline / Dependency Updates (push) Has been cancelled
- Updated Anthropic API to latest version (2024-01-01) - Set Claude 3.7 Sonnet Latest as primary model - Removed deprecated Opus 3.5 references - Fixed LLM response validation and JSON parsing - Improved error handling and logging - Updated model configurations and pricing - Enhanced document processing reliability - Fixed TypeScript type issues - Updated environment configuration
3.4 KiB
3.4 KiB
🚀 Production Migration Quick Reference
Essential steps to migrate from testing to production
⚡ Quick Migration (Automated)
# 1. Make script executable
chmod +x deploy-production.sh
# 2. Run automated migration
./deploy-production.sh
🔧 Manual Migration (Step-by-Step)
Pre-Migration
# 1. Verify testing environment is working
curl -s "https://cim-summarizer-testing.web.app/health"
# 2. Create production environment files
# - backend/.env.production
# - frontend/.env.production
Migration Steps
# 1. Create backup
BACKUP_BRANCH="backup-production-$(date +%Y%m%d-%H%M%S)"
git checkout -b "$BACKUP_BRANCH"
git add . && git commit -m "Backup: Production before migration"
git checkout preview-capabilities-phase1-2
# 2. Switch to production
cd backend && cp .env.production .env && firebase use production && cd ..
cd frontend && cp .env.production .env && firebase use production && cd ..
# 3. Test and build
cd backend && npm test && npm run build && cd ..
cd frontend && npm test && npm run build && cd ..
# 4. Run migrations
cd backend && export NODE_ENV=production && npm run db:migrate && cd ..
# 5. Deploy
firebase deploy --only functions,hosting,storage --project cim-summarizer
Post-Migration Verification
# 1. Health check
curl -s "https://cim-summarizer.web.app/health"
# 2. Test endpoints
curl -s "https://cim-summarizer.web.app/api/cost/user-metrics"
curl -s "https://cim-summarizer.web.app/api/cache/stats"
curl -s "https://cim-summarizer.web.app/api/processing/health"
# 3. Manual testing
# - Visit: https://cim-summarizer.web.app
# - Test login, upload, processing, download
🔄 Emergency Rollback
# Quick rollback
git checkout backup-production-YYYYMMDD-HHMMSS
./scripts/switch-environment.sh production
firebase deploy --only functions,hosting,storage --project cim-summarizer
📋 Key Files to Update
Backend Environment (backend/.env.production)
NODE_ENV=productionFB_PROJECT_ID=cim-summarizerSUPABASE_URL=https://your-production-project.supabase.coGCLOUD_PROJECT_ID=cim-summarizer- Production API keys and credentials
Frontend Environment (frontend/.env.production)
VITE_FIREBASE_PROJECT_ID=cim-summarizerVITE_API_BASE_URL=https://us-central1-cim-summarizer.cloudfunctions.net/apiVITE_NODE_ENV=production
🔍 Critical Checks
- Testing environment is healthy
- Production environment files exist
- All tests pass
- Database migrations ready
- Firebase project access confirmed
- Production API keys configured
- Backup created before migration
🚨 Common Issues
| Issue | Solution |
|---|---|
| Environment file missing | Create .env.production files |
| Firebase project access | firebase login and firebase use production |
| Migration errors | Check database connection and run manually |
| Deployment failures | Check Firebase project permissions |
| Health check fails | Verify environment variables and restart |
📞 Support
- Logs:
firebase functions:log --project cim-summarizer - Status:
firebase functions:list --project cim-summarizer - Console: https://console.firebase.google.com/project/cim-summarizer
🎯 Goal: Migrate tested features to production with 100% correctness and proper configuration.