优化稳定性部署
This commit is contained in:
28
ecosystem.config.js
Normal file
28
ecosystem.config.js
Normal file
@@ -0,0 +1,28 @@
|
||||
module.exports = {
|
||||
apps: [{
|
||||
name: 'promptforge',
|
||||
script: 'npx',
|
||||
args: 'next@14.0.4 dev -H 0.0.0.0 -p 3000',
|
||||
cwd: '/home/renjianbo/aiapply',
|
||||
instances: 1,
|
||||
autorestart: true,
|
||||
watch: false,
|
||||
max_memory_restart: '1G',
|
||||
env: {
|
||||
NODE_ENV: 'development',
|
||||
PORT: 3000
|
||||
},
|
||||
error_file: '/home/renjianbo/aiapply/logs/err.log',
|
||||
out_file: '/home/renjianbo/aiapply/logs/out.log',
|
||||
log_file: '/home/renjianbo/aiapply/logs/combined.log',
|
||||
time: true,
|
||||
// 进程管理配置
|
||||
min_uptime: '10s',
|
||||
max_restarts: 10,
|
||||
restart_delay: 4000,
|
||||
// 健康检查
|
||||
health_check_grace_period: 3000,
|
||||
// 环境变量
|
||||
env_file: '.env.local'
|
||||
}]
|
||||
}
|
||||
Reference in New Issue
Block a user