Update 2026-06-23 10:40:10
Build and Push Docker Images / Build Backend Image (push) Has been cancelled
Build and Push Docker Images / Build Frontend Image (push) Has been cancelled
Build and Push Docker Images / Notify Build Complete (push) Has been cancelled

This commit is contained in:
yi
2026-06-23 10:40:10 +08:00
parent 864efb7f9d
commit e9bff9beb3
56 changed files with 295 additions and 292 deletions
+8 -8
View File
@@ -11,7 +11,7 @@ function generateBackendEnv() {
try {
const jwtSecret = generateSecretKey(64);
let envContent = `# IDC设备管理系统 - 环境配置
let envContent = `# 云睿资产管理系统 - 环境配置
# 生成时间: ${new Date().toISOString()}
# ==============================================
@@ -42,7 +42,7 @@ DB_TYPE=${config.dbType}
if (config.dbType === 'sqlite') {
envContent += `
# SQLite 配置
DB_PATH=./idc_management.db
DB_PATH=./yunrui_management.db
`;
} else {
envContent += `
@@ -85,7 +85,7 @@ function generatePM2Config() {
const pm2Config = {
apps: [{
name: 'idc-backend',
name: 'yunrui_asset-backend',
script: './server.js',
cwd: path.join(__dirname, '..', 'backend'),
instances: 1,
@@ -106,7 +106,7 @@ function generatePM2Config() {
if (config.frontendDeploy === 'pm2') {
pm2Config.apps.push({
name: 'idc-frontend',
name: 'yunrui_asset-frontend',
script: 'serve',
cwd: path.join(__dirname, '..', 'frontend'),
args: `-s dist -l ${config.frontendPort}`,
@@ -145,12 +145,12 @@ function generateNginxConfig() {
if (isWindows) {
frontendPath = path.join(__dirname, '..', 'frontend', 'dist').replace(/\\/g, '/');
} else {
frontendPath = '/var/www/idc';
frontendPath = '/var/www/yunrui_asset';
}
config.nginxRoot = frontendPath;
const nginxConfig = `# IDC设备管理系统 - Nginx配置
const nginxConfig = `# 云睿资产管理系统 - Nginx配置
# 生成时间: ${new Date().toISOString()}
server {
@@ -210,8 +210,8 @@ server {
}
`;
fs.writeFileSync(path.join(deployDir, 'nginx-idc.conf'), nginxConfig);
log.success('Nginx 配置文件已生成 (deploy/nginx-idc.conf)');
fs.writeFileSync(path.join(deployDir, 'nginx-yunrui.conf'), nginxConfig);
log.success('Nginx 配置文件已生成 (deploy/nginx-yunrui.conf)');
if (isWindows) {
log.info('Windows Nginx 配置路径示例:');