Files
ggl/ecosystem.config.js
2025-10-05 13:34:28 +08:00

40 lines
1008 B
JavaScript

module.exports = {
apps: [
{
name: 'ggl-xi-plus-production',
script: 'start-production.cjs',
instances: 1,
autorestart: true,
watch: false,
max_memory_restart: '1G',
min_uptime: '10s',
max_restarts: 10,
restart_delay: 4000,
env: {
NODE_ENV: 'production',
PORT: 4001,
FRONTEND_PORT: 4002,
DOMAIN: 'ggl.xi.plus'
},
log_file: './logs/pm2-combined.log',
out_file: './logs/pm2-out.log',
error_file: './logs/pm2-error.log',
log_date_format: 'YYYY-MM-DD HH:mm:ss Z',
merge_logs: true,
kill_timeout: 5000,
listen_timeout: 8000,
shutdown_with_message: true
}
],
deploy: {
production: {
user: 'www',
host: 'localhost',
ref: 'origin/main',
repo: 'git@github.com:username/ggl.git',
path: '/www/wwwroot/ggl',
'post-deploy': 'npm install && npm run build && pm2 reload ecosystem.config.js --env production'
}
}
};