DeveloperBreeze

Pm2 Log Rotation Development Tutorials, Guides & Insights

Unlock 1+ expert-curated pm2 log rotation tutorials, real-world code snippets, and modern dev strategies. From fundamentals to advanced topics, boost your pm2 log rotation skills on DeveloperBreeze.

PM2 Cheatsheet

Cheatsheet October 14, 2024

pm2 deploy ecosystem.config.js production update
   module.exports = {
     apps: [
       {
         name: 'app-name',
         script: 'app.js',
         env: {
           NODE_ENV: 'development',
         },
         env_production: {
           NODE_ENV: 'production',
         }
       }
     ],
     deploy: {
       production: {
         user: 'username',
         host: 'your-server.com',
         ref: 'origin/master',
         repo: 'git@github.com:your-repo.git',
         path: '/var/www/your-app',
         'post-deploy': 'npm install && pm2 reload ecosystem.config.js --env production',
       }
     }
   };