Implement proper storage metrics (P0-009)\n\n- Add dedicated storage_metrics table\n- Create StorageMetricReport models with proper field names\n- Add ReportStorageMetrics to agent client\n- Update storage scanner to use new method\n- Implement server-side handlers and queries\n- Register new routes and update UI\n- Remove legacy Scan() method\n- Follow ETHOS principles: honest naming, clean architecture
This commit is contained in:
35
restart_and_fix.sh
Normal file
35
restart_and_fix.sh
Normal file
@@ -0,0 +1,35 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "=== RedFlag Database Recovery Script ==="
|
||||
echo
|
||||
|
||||
echo "1. Stopping containers..."
|
||||
docker-compose down
|
||||
|
||||
echo
|
||||
echo "2. Removing postgres volume to reset database (WARNING: This will delete all data)..."
|
||||
docker volume rm redflag_postgres-data 2>/dev/null
|
||||
|
||||
echo
|
||||
echo "3. Starting containers with fixed configuration..."
|
||||
docker-compose up -d
|
||||
|
||||
echo
|
||||
echo "4. Waiting for database to be ready..."
|
||||
sleep 10
|
||||
docker exec redflag-postgres pg_isready -U redflag
|
||||
|
||||
echo
|
||||
echo "5. Checking server logs (tail):"
|
||||
echo "=========================="
|
||||
docker logs redflag-server --tail 50
|
||||
|
||||
echo
|
||||
echo "=========================="
|
||||
echo "If migrations ran successfully, you should see:"
|
||||
echo "- Database migrations completed message"
|
||||
echo "- Default security settings initialized"
|
||||
echo "- Admin user ensured"
|
||||
echo
|
||||
echo "The server should now be accessible at http://localhost:8080"
|
||||
echo "Login with admin / Qu@ntum21!"
|
||||
Reference in New Issue
Block a user