- Copy code/image/config files across all modules - Translate brand-voice and code-review templates - Translate CONTRIBUTING, CODE_OF_CONDUCT, SECURITY, STYLE_GUIDE - Copy CHANGELOG as-is (technical log) Ref: luongnv89/claude-howto#63
31 lines
637 B
Bash
31 lines
637 B
Bash
#!/bin/bash
|
|
|
|
echo "🏥 System Health Check"
|
|
echo "===================="
|
|
|
|
ENV=${1:-production}
|
|
|
|
# Check API
|
|
echo -n "API: "
|
|
if curl -sf http://api.$ENV.example.com/health > /dev/null; then
|
|
echo "✅ Healthy"
|
|
else
|
|
echo "❌ Unhealthy"
|
|
fi
|
|
|
|
# Check Database
|
|
echo -n "Database: "
|
|
if pg_isready -h db.$ENV.example.com > /dev/null 2>&1; then
|
|
echo "✅ Healthy"
|
|
else
|
|
echo "❌ Unhealthy"
|
|
fi
|
|
|
|
# Check Pods
|
|
echo -n "Kubernetes Pods: "
|
|
PODS_READY=$(kubectl get pods -n $ENV --no-headers | grep "Running" | wc -l)
|
|
PODS_TOTAL=$(kubectl get pods -n $ENV --no-headers | wc -l)
|
|
echo "$PODS_READY/$PODS_TOTAL ready"
|
|
|
|
echo "===================="
|