1234567891011121314151617181920212223242526272829303132333435363738394041 |
- /**
- * PM2启动配置
- */
- module.exports = {
- apps: [{
- name: "sql-api",
- script: 'index.js',
- watch: ['src'],
- ignore_watch: ['node_modules', 'dist', 'logs'],
- out_file: '/data/logs/pm2/admin/out.log',
- error_file: '/data/logs/pm2/admin/error.log',
- max_memory_restart: '2G', //超过多大内存自动重启,仅防止内存泄露有意义,需要根据自己的业务设置
- exec_mode: 'cluster', //开启多线程模式,用于负载均衡
- instances: '1', //启用多少个实例,可用于负载均衡
- autorestart: true, //程序崩溃后自动重启
- env: { NODE_ENV: 'production' },
- }
- // ,
- // {
- // name : "pacs-server-test",
- // script : 'index.js',
- // watch : ['src'],
- // ignore_watch : ['node_modules', 'dist', 'logs'],
- // out_file : '/data/logs/pm2/pacs/out.test.log',
- // error_file : '/data/logs/pm2/pacs/error.test.log',
- // max_memory_restart: '2G', //超过多大内存自动重启,仅防止内存泄露有意义,需要根据自己的业务设置
- // exec_mode : 'cluster', //开启多线程模式,用于负载均衡
- // instances : '1', //启用多少个实例,可用于负载均衡
- // autorestart: true, //程序崩溃后自动重启
- // env : {NODE_ENV : 'test'},
- // }
- ]
- }
|