// PM2 Ecosystem config per VigilanzaTurni
// Le variabili .env vengono caricate dallo script deploy.sh e passate tramite 'export'

export default {
  apps: [{
    name: 'vigilanza-turni',
    script: 'npm',
    args: 'start',
    cwd: '/var/www/vigilanza-turni',
    instances: 1,
    autorestart: true,
    watch: false,
    max_memory_restart: '1G',
    error_file: '/root/.pm2/logs/vigilanza-turni-error.log',
    out_file: '/root/.pm2/logs/vigilanza-turni-out.log',
    log_date_format: 'YYYY-MM-DD HH:mm:ss Z',
    kill_timeout: 3000,
    wait_ready: false,
    listen_timeout: 3000
  }]
};
