docs(deploy): Complete full system deployment to Aliyun SAE
Summary: - Successfully deployed complete system to Aliyun SAE (2025-12-25) - All services running: Python microservice + Node.js backend + Frontend Nginx + CLB - Public access available at http://8.140.53.236/ Major Achievements: 1. Python microservice deployed (v1.0, internal IP: 172.17.173.66:8000) 2. Node.js backend deployed (v1.3, internal IP: 172.17.173.73:3001) - Fixed 4 critical issues: bash path, config directory, pino-pretty, ES Module 3. Frontend Nginx deployed (v1.0, internal IP: 172.17.173.72:80) 4. CLB load balancer configured (public IP: 8.140.53.236) New Documentation (9 docs): - 11-Node.js backend SAE deployment config checklist (21 env vars) - 12-Node.js backend SAE deployment operation manual - 13-Node.js backend image fix record (config directory) - 14-Node.js backend pino-pretty fix - 15-Node.js backend deployment success summary - 16-Frontend Nginx deployment success summary - 17-Complete deployment practical manual 2025 edition (1800 lines) - 18-Deployment documentation usage guide - 19-Daily update quick operation manual (670 lines) Key Fixes: - Environment variable name correction: EXTRACTION_SERVICE_URL (not PYTHON_SERVICE_URL) - Dockerfile fix: added COPY config ./config - Logger configuration: conditional pino-pretty for dev only - Health check fix: ES Module compatibility (require -> import) Updated Files: - System status document updated with full deployment info - Deployment progress overview updated with latest IPs - All 3 Docker services' Dockerfiles and configs refined Verification: - All health checks passed - Tool C 7 features working correctly - Literature screening module functional - Response time < 1 second BREAKING CHANGE: Node.js backend internal IP changed from 172.17.173.71 to 172.17.173.73 Closes #deployment-milestone
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { FastifyInstance, FastifyRequest, FastifyReply } from 'fastify'
|
||||
import { prisma, getDatabaseConnectionCount } from '../../config/database.js'
|
||||
import os from 'os'
|
||||
|
||||
/**
|
||||
* 健康检查响应
|
||||
@@ -201,7 +202,7 @@ export async function registerHealthRoutes(app: FastifyInstance): Promise<void>
|
||||
// ========== CPU信息 ==========
|
||||
checks.cpu = {
|
||||
usage: process.cpuUsage(),
|
||||
loadAverage: process.platform !== 'win32' ? require('os').loadavg() : 'N/A'
|
||||
loadAverage: process.platform !== 'win32' ? os.loadavg() : 'N/A'
|
||||
}
|
||||
|
||||
// ========== 返回响应 ==========
|
||||
|
||||
@@ -293,3 +293,4 @@ export function getBatchItems<T>(
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -26,18 +26,25 @@ import { jobQueue } from './common/jobs/index.js';
|
||||
return Number(this);
|
||||
};
|
||||
|
||||
// 生产环境使用JSON格式日志(性能更好),开发环境使用pino-pretty(易读)
|
||||
const fastify = Fastify({
|
||||
logger: {
|
||||
level: config.logLevel,
|
||||
transport: {
|
||||
target: 'pino-pretty',
|
||||
options: {
|
||||
colorize: true,
|
||||
translateTime: 'HH:MM:ss Z',
|
||||
ignore: 'pid,hostname',
|
||||
logger: config.nodeEnv === 'production'
|
||||
? {
|
||||
level: config.logLevel,
|
||||
// 生产环境:简单的JSON日志,适合日志收集系统
|
||||
}
|
||||
: {
|
||||
level: config.logLevel,
|
||||
// 开发环境:使用pino-pretty美化输出
|
||||
transport: {
|
||||
target: 'pino-pretty',
|
||||
options: {
|
||||
colorize: true,
|
||||
translateTime: 'HH:MM:ss Z',
|
||||
ignore: 'pid,hostname',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
// 注册CORS插件 - 完整配置
|
||||
|
||||
@@ -327,5 +327,6 @@ runTests().catch((error) => {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -268,5 +268,6 @@ runTest()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -306,5 +306,6 @@ Content-Type: application/json
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -242,5 +242,6 @@ export const conflictDetectionService = new ConflictDetectionService();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -192,5 +192,6 @@ curl -X POST http://localhost:3000/api/v1/dc/tool-c/test/execute \
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -246,5 +246,6 @@ export const streamAIController = new StreamAIController();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -394,3 +394,4 @@ SET session_replication_role = 'origin';
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -96,3 +96,4 @@ WHERE key = 'verify_test';
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -239,3 +239,4 @@ verifyDatabase()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
1
backend/src/types/global.d.ts
vendored
1
backend/src/types/global.d.ts
vendored
@@ -29,3 +29,4 @@ export {}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user