Files
Avtex/server/ecosystem.config.js
T

30 lines
712 B
JavaScript

module.exports = {
apps: [{
name: 'xflow-api',
script: './api/src/index.js',
instances: 1,
exec_mode: 'fork',
env: {
NODE_ENV: 'production',
PORT: 3001
},
error_file: './logs/err.log',
out_file: './logs/out.log',
log_file: './logs/combined.log',
time: true,
max_memory_restart: '256M',
restart_delay: 3000,
max_restarts: 5,
min_uptime: '10s',
watch: false,
ignore_watch: ['node_modules', 'logs', 'data'],
merge_logs: true,
log_type: 'json',
log_date_format: 'YYYY-MM-DD HH:mm:ss Z',
// Auto-restart on failure
autorestart: true,
// Don't restart if crashing too fast
exp_backoff_restart_delay: 100
}]
};