module.exports = { apps: [{ name: 'runlock', script: 'npm', args: 'start', instances: 1, autorestart: true, watch: false, max_memory_restart: '1G', env: { NODE_ENV: 'production', PORT: 3000 }, error_file: './logs/pm2-error.log', out_file: './logs/pm2-out.log', log_date_format: 'YYYY-MM-DD HH:mm:ss Z', merge_logs: true, // Redémarrer automatiquement après un crash min_uptime: '10s', max_restarts: 10, restart_delay: 4000 }] }