ecosystem.config.js 784 B

123456789101112131415161718192021222324252627282930313233
  1. module.exports = {
  2. apps : [{
  3. name: 'node-elm',
  4. script: 'index.js',
  5. instances: 1 ,
  6. autorestart: true,
  7. watch: false,
  8. max_memory_restart: '1G',
  9. output: 'logs/out.log',
  10. error: 'logs/error.log',
  11. log: 'logs/combined.outerr.log',
  12. env: {
  13. NODE_ENV: 'development'
  14. },
  15. env_production: {
  16. NODE_ENV: 'production',
  17. HOST: '0.0.0.0',
  18. PORT: 8001,
  19. }
  20. }],
  21. deploy: {
  22. production: {
  23. user: 'root',
  24. host: ['139.224.234.213'],
  25. port: '22',
  26. ref : 'origin/master',
  27. repo: 'git@github.com:bailicangdu/node-elm.git',
  28. path: '/root/mygit/node-elm',
  29. 'ssh_options': 'StrictHostKeyChecking=no',
  30. 'post-deploy': 'npm install && pm2 reload ecosystem.config.js --env production',
  31. }
  32. }
  33. };