← back to Goodquestion

ecosystem.config.js

30 lines

module.exports = {
  apps: [{
    name: 'goodquestion',
    script: 'npm',
    args: 'start',
    cwd: '/root/Projects/goodquestion-ai',
    exec_mode: 'fork',
    instances: 1,
    autorestart: true,
    watch: false,
    max_memory_restart: '2G',
    env: {
      NODE_ENV: 'production',
      PORT: 3003,
      HOSTNAME: '0.0.0.0'
    },
    error_file: './logs/pm2-error.log',
    out_file: './logs/pm2-out.log',
    log_file: './logs/pm2-combined.log',
    time: true,
    restart_delay: 5000,
    max_restarts: 999999,
    min_uptime: '30s',
    kill_timeout: 30000,
    exp_backoff_restart_delay: 100,
    listen_timeout: 120000,
    shutdown_with_message: false
  }]
};