← back to Designer Wallcoverings
DW-Agents/dw-agents/agent-task-orchestrator/ecosystem.config.js
235 lines
/**
* PM2 Ecosystem Configuration for DW-Agents
*
* Start all agents: pm2 start ecosystem.config.js
* View status: pm2 list
* View logs: pm2 logs
* Stop all: pm2 stop all
* Restart all: pm2 restart all
*/
module.exports = {
apps: [
{
name: 'dw-master-hub',
script: './node_modules/.bin/tsx',
args: 'master-hub.ts',
cwd: '/root/Projects/Designer-Wallcoverings/DW-Agents',
instances: 1,
autorestart: true,
watch: false,
max_memory_restart: '500M',
env: {
NODE_ENV: 'production',
PORT: 9712
},
error_file: '/root/Projects/Designer-Wallcoverings/DW-Agents/logs/hub-error.log',
out_file: '/root/Projects/Designer-Wallcoverings/DW-Agents/logs/hub-out.log',
log_date_format: 'YYYY-MM-DD HH:mm:ss Z',
merge_logs: true
},
{
name: 'dw-digital-samples',
script: './node_modules/.bin/tsx',
args: 'digital-samples-agent.ts',
cwd: '/root/Projects/Designer-Wallcoverings/DW-Agents',
instances: 1,
autorestart: true,
watch: false,
max_memory_restart: '500M',
env: {
NODE_ENV: 'production',
PORT: 9879,
SLACK_BOT_TOKEN: '${SLACK_BOT_TOKEN}',
SHOPIFY_STORE_DOMAIN: 'designer-laboratory-sandbox.myshopify.com',
SHOPIFY_ACCESS_TOKEN: (process.env.SHOPIFY_ADMIN_TOKEN || '')
},
error_file: '/root/Projects/Designer-Wallcoverings/DW-Agents/logs/digital-samples-error.log',
out_file: '/root/Projects/Designer-Wallcoverings/DW-Agents/logs/digital-samples-out.log',
log_date_format: 'YYYY-MM-DD HH:mm:ss Z',
merge_logs: true
},
{
name: 'dw-legal-team',
script: '../node_modules/.bin/tsx',
args: 'legal-agent.ts',
cwd: '/root/Projects/Designer-Wallcoverings/DW-Agents/DWLegalTeam',
instances: 1,
autorestart: true,
watch: false,
max_memory_restart: '500M',
min_uptime: '10s',
max_restarts: 50,
restart_delay: 4000,
exp_backoff_restart_delay: 100,
env: {
NODE_ENV: 'production',
PORT: 9878,
SHOPIFY_STORE_DOMAIN: 'designer-laboratory-sandbox.myshopify.com',
SHOPIFY_ADMIN_ACCESS_TOKEN: (process.env.SHOPIFY_ADMIN_TOKEN || '')
},
error_file: '/root/Projects/Designer-Wallcoverings/DW-Agents/logs/legal-error.log',
out_file: '/root/Projects/Designer-Wallcoverings/DW-Agents/logs/legal-out.log',
log_date_format: 'YYYY-MM-DD HH:mm:ss Z',
merge_logs: true
},
{
name: 'dw-purchasing-office',
script: './node_modules/.bin/tsx',
args: 'purchasing-office-agent.ts',
cwd: '/root/Projects/Designer-Wallcoverings/DW-Agents',
instances: 1,
autorestart: true,
watch: false,
max_memory_restart: '500M',
env: {
NODE_ENV: 'production',
PORT: 9880
},
error_file: '/root/Projects/Designer-Wallcoverings/DW-Agents/logs/purchasing-error.log',
out_file: '/root/Projects/Designer-Wallcoverings/DW-Agents/logs/purchasing-out.log',
log_date_format: 'YYYY-MM-DD HH:mm:ss Z',
merge_logs: true
},
{
name: 'dw-marketing',
script: './node_modules/.bin/tsx',
args: 'marketing-agent.ts',
cwd: '/root/Projects/Designer-Wallcoverings/DW-Agents',
instances: 1,
autorestart: true,
watch: false,
max_memory_restart: '500M',
env: {
NODE_ENV: 'production',
PORT: 9881,
SHOPIFY_STORE_DOMAIN: 'designer-laboratory-sandbox.myshopify.com',
SHOPIFY_ACCESS_TOKEN: (process.env.SHOPIFY_ADMIN_TOKEN || '')
},
error_file: '/root/Projects/Designer-Wallcoverings/DW-Agents/logs/marketing-error.log',
out_file: '/root/Projects/Designer-Wallcoverings/DW-Agents/logs/marketing-out.log',
log_date_format: 'YYYY-MM-DD HH:mm:ss Z',
merge_logs: true
},
{
name: 'dw-accounting',
script: './node_modules/.bin/tsx',
args: 'accounting-agent.ts',
cwd: '/root/Projects/Designer-Wallcoverings/DW-Agents',
instances: 1,
autorestart: true,
watch: false,
max_memory_restart: '500M',
env: {
NODE_ENV: 'production',
PORT: 9882
},
error_file: '/root/Projects/Designer-Wallcoverings/DW-Agents/logs/accounting-error.log',
out_file: '/root/Projects/Designer-Wallcoverings/DW-Agents/logs/accounting-out.log',
log_date_format: 'YYYY-MM-DD HH:mm:ss Z',
merge_logs: true
},
{
name: 'dw-trend-research',
script: './node_modules/.bin/tsx',
args: 'trend-research-agent.ts',
cwd: '/root/Projects/Designer-Wallcoverings/DW-Agents',
instances: 1,
autorestart: true,
watch: false,
max_memory_restart: '500M',
env: {
NODE_ENV: 'production',
PORT: 9883
},
error_file: '/root/Projects/Designer-Wallcoverings/DW-Agents/logs/trend-research-error.log',
out_file: '/root/Projects/Designer-Wallcoverings/DW-Agents/logs/trend-research-out.log',
log_date_format: 'YYYY-MM-DD HH:mm:ss Z',
merge_logs: true
},
{
name: 'dw-zendesk-chat',
script: './node_modules/.bin/tsx',
args: 'zendesk-chat-agent.ts',
cwd: '/root/Projects/Designer-Wallcoverings/DW-Agents',
instances: 1,
autorestart: true,
watch: false,
max_memory_restart: '500M',
env: {
NODE_ENV: 'production',
PORT: 9884,
ZENDESK_DOMAIN: 'designerwallcoverings.zendesk.com',
ZENDESK_EMAIL: 'info@designerwallcoverings.com',
ZENDESK_PASSWORD: '*Zopimaccess911*'
},
error_file: '/root/Projects/Designer-Wallcoverings/DW-Agents/logs/zendesk-error.log',
out_file: '/root/Projects/Designer-Wallcoverings/DW-Agents/logs/zendesk-out.log',
log_date_format: 'YYYY-MM-DD HH:mm:ss Z',
merge_logs: true
},
{
name: 'dw-shopify-store',
script: './node_modules/.bin/tsx',
args: 'agent-shopify-store/shopify-store-agent.ts',
cwd: '/root/Projects/Designer-Wallcoverings/DW-Agents',
instances: 1,
autorestart: true,
watch: false,
max_memory_restart: '500M',
env: {
NODE_ENV: 'production',
PORT: 7238,
SHOPIFY_STORE_DOMAIN: 'designer-laboratory-sandbox.myshopify.com',
SHOPIFY_ACCESS_TOKEN: (process.env.SHOPIFY_ADMIN_TOKEN || '')
},
error_file: '/root/Projects/Designer-Wallcoverings/DW-Agents/logs/shopify-store-error.log',
out_file: '/root/Projects/Designer-Wallcoverings/DW-Agents/logs/shopify-store-out.log',
log_date_format: 'YYYY-MM-DD HH:mm:ss Z',
merge_logs: true,
min_uptime: '10s',
max_restarts: 10
},
{
name: 'dw-log-monitor',
script: './node_modules/.bin/tsx',
args: 'agent-log-monitor/log-monitor-agent.ts',
cwd: '/root/Projects/Designer-Wallcoverings/DW-Agents',
instances: 1,
autorestart: true,
watch: false,
max_memory_restart: '300M',
env: {
NODE_ENV: 'production',
PORT: 7239
},
error_file: '/root/Projects/Designer-Wallcoverings/DW-Agents/logs/log-monitor-error.log',
out_file: '/root/Projects/Designer-Wallcoverings/DW-Agents/logs/log-monitor-out.log',
log_date_format: 'YYYY-MM-DD HH:mm:ss Z',
merge_logs: true,
min_uptime: '10s',
max_restarts: 10
},
{
name: 'dw-ui-manager',
script: './node_modules/.bin/tsx',
args: 'agent-ui-manager/ui-manager-agent.ts',
cwd: '/root/Projects/Designer-Wallcoverings/DW-Agents',
instances: 1,
autorestart: true,
watch: false,
max_memory_restart: '300M',
env: {
NODE_ENV: 'production',
PORT: 7240
},
error_file: '/root/Projects/Designer-Wallcoverings/DW-Agents/logs/ui-manager-error.log',
out_file: '/root/Projects/Designer-Wallcoverings/DW-Agents/logs/ui-manager-out.log',
log_date_format: 'YYYY-MM-DD HH:mm:ss Z',
merge_logs: true,
min_uptime: '10s',
max_restarts: 10
}
]
};