feat(deploy): 更新后端 API 域名并添加部署指南
- 将后端 API域名从 https://api.jiebanke.com 改为 https://webapi.jiebanke.com - 新增 CentOS 服务器部署指南和相关脚本 - 更新环境变量配置和 API 文档中的示例 URL
This commit is contained in:
44
backend/ecosystem.config.js
Normal file
44
backend/ecosystem.config.js
Normal file
@@ -0,0 +1,44 @@
|
||||
module.exports = {
|
||||
apps: [{
|
||||
name: 'jiebanke-backend',
|
||||
script: './src/server.js',
|
||||
instances: 'max',
|
||||
exec_mode: 'cluster',
|
||||
env: {
|
||||
NODE_ENV: 'development',
|
||||
PORT: 3000,
|
||||
WATCH: true
|
||||
},
|
||||
env_production: {
|
||||
NODE_ENV: 'production',
|
||||
PORT: 3000,
|
||||
WATCH: false
|
||||
},
|
||||
env_test: {
|
||||
NODE_ENV: 'test',
|
||||
PORT: 3001,
|
||||
WATCH: false
|
||||
},
|
||||
// 日志配置
|
||||
log_file: '/data/nodejs/jiebanke/logs/combined.log',
|
||||
out_file: '/data/nodejs/jiebanke/logs/out.log',
|
||||
error_file: '/data/nodejs/jiebanke/logs/error.log',
|
||||
// 性能配置
|
||||
max_memory_restart: '1G',
|
||||
kill_timeout: 3000,
|
||||
wait_ready: true,
|
||||
listen_timeout: 3000,
|
||||
// 监控配置
|
||||
watch: false,
|
||||
ignore_watch: [
|
||||
'node_modules',
|
||||
'logs',
|
||||
'.git',
|
||||
'uploads'
|
||||
],
|
||||
// 重启策略
|
||||
autorestart: true,
|
||||
max_restarts: 10,
|
||||
restart_delay: 4000
|
||||
}]
|
||||
};
|
||||
Reference in New Issue
Block a user