module.exports = {
  apps: [
    {
      name: 'horux-api',
      interpreter: 'node',
      script: 'src/index.ts',
      node_args: '--import /root/HoruxDespachosNuevo/node_modules/.pnpm/tsx@4.21.0/node_modules/tsx/dist/loader.mjs',
      cwd: '/root/HoruxDespachosNuevo/apps/api',
      instances: 1,
      exec_mode: 'fork',
      autorestart: true,
      max_memory_restart: '1G',
      kill_timeout: 15000,
      listen_timeout: 15000,
      env: {
        NODE_ENV: 'production',
        PORT: 4000,
      },
    },
    {
      name: 'horux-web',
      script: 'node_modules/next/dist/bin/next',
      args: 'start',
      cwd: '/root/HoruxDespachosNuevo/apps/web',
      instances: 1,
      exec_mode: 'fork',
      autorestart: true,
      max_memory_restart: '512M',
      kill_timeout: 5000,
      env: {
        NODE_ENV: 'production',
        PORT: 3000,
      },
    },
  ],
};
