← back to Designer Wallcoverings
DW-Agents/dw-agents/ecosystem-critical-agents.config.js
138 lines
/**
* PM2 Ecosystem Configuration for Critical DW-Agents
*
* This ensures all critical agents auto-start and auto-restart
* Run: pm2 start ecosystem-critical-agents.config.js
* Save: pm2 save
*/
module.exports = {
apps: [
{
name: 'dw-control-panel',
script: 'tsx',
args: 'agent-control-panel.ts',
cwd: '/root/DW-Agents',
interpreter: 'none',
env: {
NODE_ENV: 'production',
PORT: 7200
},
autorestart: true,
max_restarts: 10,
min_uptime: '10s',
max_memory_restart: '500M',
exp_backoff_restart_delay: 100,
restart_delay: 1000,
error_file: '/root/DW-Agents/logs/control-panel-error.log',
out_file: '/root/DW-Agents/logs/control-panel-out.log',
log_date_format: 'YYYY-MM-DD HH:mm:ss Z',
merge_logs: true,
kill_timeout: 5000,
listen_timeout: 10000,
instances: 1,
exec_mode: 'fork'
},
{
name: 'dw-server-uptime',
script: 'tsx',
args: 'agent-server-uptime/server-uptime-agent.ts',
cwd: '/root/DW-Agents',
interpreter: 'none',
env: {
NODE_ENV: 'production',
PORT: 9888
},
autorestart: true,
max_restarts: 10,
min_uptime: '10s',
max_memory_restart: '500M',
exp_backoff_restart_delay: 100,
restart_delay: 1000,
error_file: '/root/DW-Agents/logs/server-uptime-error.log',
out_file: '/root/DW-Agents/logs/server-uptime-out.log',
log_date_format: 'YYYY-MM-DD HH:mm:ss Z',
merge_logs: true,
kill_timeout: 5000,
listen_timeout: 10000,
instances: 1,
exec_mode: 'fork'
},
{
name: 'dw-completed-tasks',
script: 'tsx',
args: 'agent-completed-tasks/completed-tasks-agent.ts',
cwd: '/root/DW-Agents',
interpreter: 'none',
env: {
NODE_ENV: 'production',
PORT: 9889
},
autorestart: true,
max_restarts: 10,
min_uptime: '10s',
max_memory_restart: '500M',
exp_backoff_restart_delay: 100,
restart_delay: 1000,
error_file: '/root/DW-Agents/logs/completed-tasks-error.log',
out_file: '/root/DW-Agents/logs/completed-tasks-out.log',
log_date_format: 'YYYY-MM-DD HH:mm:ss Z',
merge_logs: true,
kill_timeout: 5000,
listen_timeout: 10000,
instances: 1,
exec_mode: 'fork'
},
{
name: 'dw-skills-manager',
script: 'tsx',
args: 'agent-skills-manager/skills-manager-agent.ts',
cwd: '/root/DW-Agents',
interpreter: 'none',
env: {
NODE_ENV: 'production',
PORT: 9894
},
autorestart: true,
max_restarts: 10,
min_uptime: '10s',
max_memory_restart: '500M',
exp_backoff_restart_delay: 100,
restart_delay: 1000,
error_file: '/root/DW-Agents/logs/skills-manager-error.log',
out_file: '/root/DW-Agents/logs/skills-manager-out.log',
log_date_format: 'YYYY-MM-DD HH:mm:ss Z',
merge_logs: true,
kill_timeout: 5000,
listen_timeout: 10000,
instances: 1,
exec_mode: 'fork'
},
{
name: 'dw-in-parallel',
script: 'tsx',
args: 'in-parallel-agent.ts',
cwd: '/root/DW-Agents',
interpreter: 'none',
env: {
NODE_ENV: 'production',
PORT: 9891
},
autorestart: true,
max_restarts: 10,
min_uptime: '10s',
max_memory_restart: '500M',
exp_backoff_restart_delay: 100,
restart_delay: 1000,
error_file: '/root/DW-Agents/logs/in-parallel-error.log',
out_file: '/root/DW-Agents/logs/in-parallel-out.log',
log_date_format: 'YYYY-MM-DD HH:mm:ss Z',
merge_logs: true,
kill_timeout: 5000,
listen_timeout: 10000,
instances: 1,
exec_mode: 'fork'
}
]
};