sql.config.js 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /**
  2. * PM2启动配置
  3. */
  4. module.exports = {
  5. apps: [{
  6. name: "sql-api",
  7. script: 'index.js',
  8. watch: ['src'],
  9. ignore_watch: ['node_modules', 'dist', 'logs'],
  10. out_file: '/data/logs/pm2/admin/out.log',
  11. error_file: '/data/logs/pm2/admin/error.log',
  12. max_memory_restart: '2G', //超过多大内存自动重启,仅防止内存泄露有意义,需要根据自己的业务设置
  13. exec_mode: 'cluster', //开启多线程模式,用于负载均衡
  14. instances: '1', //启用多少个实例,可用于负载均衡
  15. autorestart: true, //程序崩溃后自动重启
  16. env: { NODE_ENV: 'production' },
  17. }
  18. // ,
  19. // {
  20. // name : "pacs-server-test",
  21. // script : 'index.js',
  22. // watch : ['src'],
  23. // ignore_watch : ['node_modules', 'dist', 'logs'],
  24. // out_file : '/data/logs/pm2/pacs/out.test.log',
  25. // error_file : '/data/logs/pm2/pacs/error.test.log',
  26. // max_memory_restart: '2G', //超过多大内存自动重启,仅防止内存泄露有意义,需要根据自己的业务设置
  27. // exec_mode : 'cluster', //开启多线程模式,用于负载均衡
  28. // instances : '1', //启用多少个实例,可用于负载均衡
  29. // autorestart: true, //程序崩溃后自动重启
  30. // env : {NODE_ENV : 'test'},
  31. // }
  32. ]
  33. }