Add MinIO verification script for production status checks
Some checks failed
Deploy MinIO Production / deploy (push) Successful in 31s
Backup MinIO Buckets / backup (push) Failing after 4s

This commit is contained in:
Frank John Begornia
2026-01-06 09:52:48 +08:00
parent c9d417bf14
commit adc979ca69

58
verify-minio.sh Executable file
View File

@@ -0,0 +1,58 @@
#!/bin/bash
# Quick MinIO verification script
echo "=========================================="
echo "MinIO Production Status Check"
echo "=========================================="
echo ""
# Get server details from secrets/env
read -p "Enter your server user@host (e.g., ubuntu@123.45.67.89): " SERVER
echo ""
echo "Checking MinIO container..."
ssh $SERVER << 'REMOTE'
echo "1⃣ Container Status:"
docker ps | grep crew-minio-prod
echo ""
echo "2⃣ Container Health:"
docker inspect crew-minio-prod --format='{{.State.Health.Status}}'
echo ""
echo "3⃣ Networks:"
docker inspect crew-minio-prod --format='{{range $k, $v := .NetworkSettings.Networks}}{{$k}} {{end}}'
echo ""
echo "4⃣ Environment Variables:"
docker exec crew-minio-prod env | grep MINIO_ | grep -v PASSWORD | grep -v SECRET
echo ""
echo "5⃣ Internal Health Check:"
docker exec crew-minio-prod curl -sf http://localhost:9000/minio/health/live && echo "✅ Healthy" || echo "❌ Unhealthy"
echo ""
echo "6⃣ Check if buckets exist:"
docker exec crew-minio-prod sh -c "
if ! command -v mc &> /dev/null; then
echo '⚠️ MinIO client not installed yet. Run setup-buckets.sh'
else
mc alias set local http://localhost:9000 \$MINIO_ROOT_USER \$MINIO_ROOT_PASSWORD 2>/dev/null
mc ls local/ 2>/dev/null || echo '⚠️ No buckets found. Run setup-buckets.sh'
fi
"
echo ""
echo "7⃣ Traefik Routes (if configured):"
docker inspect crew-minio-prod --format='{{range $k, $v := .Config.Labels}}{{if eq $k "traefik.http.routers.minio-api.rule"}}API: {{$v}}{{end}}{{if eq $k "traefik.http.routers.minio-console.rule"}}Console: {{$v}}{{end}}{{end}}'
echo ""
echo "=========================================="
echo "Next Steps:"
echo "=========================================="
echo "1. Run setup-buckets.sh to create application buckets"
echo "2. Test console access (via SSH tunnel or domain)"
echo "3. Configure apps to use MinIO"
echo "4. Migrate images from old server"
REMOTE