docs(docker): Add /var space issue documentation and monitoring scripts
This commit is contained in:
parent
f0b5109f61
commit
b0318430ad
4 changed files with 347 additions and 0 deletions
42
backend/scripts/verify-stack.sh
Executable file
42
backend/scripts/verify-stack.sh
Executable file
|
|
@ -0,0 +1,42 @@
|
|||
#!/bin/bash
|
||||
# Verify MongoDB and Backend are running correctly
|
||||
|
||||
echo "================================"
|
||||
echo "Normogen Stack Verification"
|
||||
echo "================================"
|
||||
echo ""
|
||||
|
||||
# Check containers are running
|
||||
echo "1. Checking containers..."
|
||||
docker ps --format "table {{.Names}} {{.Status}} {{.Ports}}" | grep normogen
|
||||
echo ""
|
||||
|
||||
# Check MongoDB health
|
||||
echo "2. Checking MongoDB health..."
|
||||
MONGO_HEALTH=$(docker inspect normogen-mongodb-dev --format='{{.State.Health.Status}}' 2>/dev/null)
|
||||
echo " MongoDB Health: $MONGO_HEALTH"
|
||||
echo ""
|
||||
|
||||
# Check if MongoDB is accepting connections
|
||||
echo "3. Testing MongoDB connection..."
|
||||
docker exec normogen-mongodb-dev mongosh --eval 'db.runCommand({ping: 1})' --quiet 2>/dev/null && echo " OK MongoDB is responding" || echo " FAILED MongoDB not responding"
|
||||
echo ""
|
||||
|
||||
# Check backend logs
|
||||
echo "4. Checking backend startup..."
|
||||
docker logs normogen-backend-dev 2>&1 | tail -5
|
||||
echo ""
|
||||
|
||||
# Show recent MongoDB logs
|
||||
echo "5. Recent MongoDB logs..."
|
||||
docker logs normogen-mongodb-dev 2>&1 | grep -E '(waiting|ready|started|ERROR)' | tail -5
|
||||
echo ""
|
||||
|
||||
# Check filesystem space
|
||||
echo "6. Checking filesystem space..."
|
||||
df -h | grep -E '(Filesystem|/var|/$)'
|
||||
echo ""
|
||||
|
||||
echo "================================"
|
||||
echo "Verification complete"
|
||||
echo "================================"
|
||||
Loading…
Add table
Add a link
Reference in a new issue