feat: 添加部署脚本和文档并优化Kafka消费者配置
- 添加部署相关脚本(deploy.bat/update.bat/package.bat)和文档(deployment.md/package-guide.md) - 新增PM2配置文件(ecosystem.config.js/ecosystem.config.cjs) - 优化Kafka消费者配置支持动态fromOffset - 添加环境检查脚本(check-env.js) - 更新.gitignore添加release目录 - 补充.env.example配置文件
This commit is contained in:
31
ecosystem.config.cjs
Normal file
31
ecosystem.config.cjs
Normal file
@@ -0,0 +1,31 @@
|
||||
module.exports = {
|
||||
apps: [{
|
||||
name: 'bls-heartbeat',
|
||||
script: 'dist/index.es.js',
|
||||
instances: 1,
|
||||
exec_mode: 'fork',
|
||||
autorestart: true,
|
||||
watch: false,
|
||||
max_memory_restart: '1G',
|
||||
env: {
|
||||
NODE_ENV: 'production',
|
||||
PORT: 3000
|
||||
},
|
||||
env_development: {
|
||||
NODE_ENV: 'development',
|
||||
PORT: 3000
|
||||
},
|
||||
error_file: './logs/error.log',
|
||||
out_file: './logs/out.log',
|
||||
log_date_format: 'YYYY-MM-DD HH:mm:ss Z',
|
||||
merge_logs: true,
|
||||
time: true,
|
||||
min_uptime: '10s',
|
||||
max_restarts: 10,
|
||||
restart_delay: 4000,
|
||||
kill_timeout: 5000,
|
||||
listen_timeout: 10000,
|
||||
wait_ready: true,
|
||||
shutdown_with_message: true
|
||||
}]
|
||||
};
|
||||
Reference in New Issue
Block a user