refactor: reorganize project structure and improve code quality

- Move CI/CD configs to config/ci/ directory
- Reorganize scripts into categorized directories (deployment, monitoring, testing, utils)
- Consolidate documentation into docs/ directory with proper structure
- Update linting and testing configurations
- Remove obsolete test reports and performance summaries
- Add new documentation for code quality tools and contact form security
- Improve project organization and maintainability
- Fix lint-staged config to only lint JS/TS files
- Disable react/react-in-jsx-scope rule for Next.js compatibility
- Ignore scripts and test config directories in ESLint
This commit is contained in:
张翔
2026-03-24 13:38:58 +08:00
parent c06ac08510
commit 498bb3a3c8
62 changed files with 5473 additions and 6498 deletions
@@ -0,0 +1,44 @@
#!/bin/bash
echo "🔧 监控和告警系统环境检查..."
# 检查 Docker
if ! command -v docker &> /dev/null; then
echo "❌ Docker 未安装"
echo "请访问 https://docs.docker.com/get-docker/ 安装 Docker"
exit 1
else
echo "✅ Docker 已安装: $(docker --version)"
fi
# 检查 Docker Compose
if ! command -v docker-compose &> /dev/null; then
echo "❌ Docker Compose 未安装"
echo "请运行: sudo curl -L \"https://github.com/docker/compose/releases/latest/download/docker-compose-\$(uname -s)-\$(uname -m)\" -o /usr/local/bin/docker-compose"
echo "然后运行: sudo chmod +x /usr/local/bin/docker-compose"
exit 1
else
echo "✅ Docker Compose 已安装: $(docker-compose --version)"
fi
# 检查端口占用
echo ""
echo "📊 检查端口占用情况..."
check_port() {
if lsof -Pi :$1 -sTCP:LISTEN -t >/dev/null 2>&1; then
echo "⚠️ 端口 $1 已被占用"
return 1
else
echo "✅ 端口 $1 可用"
return 0
fi
}
check_port 3000 # 应用服务
check_port 9090 # Prometheus
check_port 3001 # Grafana
check_port 9093 # Alertmanager
echo ""
echo "✅ 环境检查完成!"