Files
whale-town-end/ecosystem.config.js
moyin a907e64f40 feat: 添加生产环境部署配置
- 添加 Dockerfile 和 docker-compose.yml 支持容器化部署
- 添加 PM2 配置文件 ecosystem.config.js
- 添加部署脚本模板 deploy.sh.example
- 添加 Gitea webhook 处理器模板 webhook-handler.js.example
- 添加生产环境配置模板 .env.production.example
- 添加详细的部署指南 DEPLOYMENT.md
- 更新 .gitignore 排除敏感配置文件
2025-12-17 15:37:40 +08:00

38 lines
841 B
JavaScript

module.exports = {
apps: [
{
name: 'pixel-game-server',
script: 'dist/main.js',
instances: 1,
exec_mode: 'cluster',
env: {
NODE_ENV: 'production',
PORT: 3000
},
env_production: {
NODE_ENV: 'production',
PORT: 3000
},
log_file: './logs/combined.log',
out_file: './logs/out.log',
error_file: './logs/error.log',
log_date_format: 'YYYY-MM-DD HH:mm:ss Z',
merge_logs: true,
max_memory_restart: '1G',
restart_delay: 4000,
watch: false,
ignore_watch: ['node_modules', 'logs']
},
{
name: 'webhook-handler',
script: 'webhook-handler.js',
instances: 1,
env: {
NODE_ENV: 'production',
PORT: 9000
},
restart_delay: 4000,
watch: false
}
]
};