apps: [{
name: 'MMM',
script: 'src/index.js',
instances: 1,
autorestart: true,
watch: process.env.NODE_ENV !== 'production' ? path.resolve(__dirname, 'src') : false,
ignore_watch : ["node_modules", ".git"],
watch_options: {
followSymlinks: false,
usePolling: true,
},
max_memory_restart: '256M',
testo: {
"NODE_ENV": 'development',
},
pusto : {
"NODE_ENV": 'production',
}
}]
}
command: "pm2 start ecosystem.config.js --env pusto"
вывод сонсоли
------- process.env.NODE_ENV { PATH:
app | '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
app | HOSTNAME: '2677a2412962',
app | NODE_VERSION: '11.9.0',
app | YARN_VERSION: '1.13.0',
app | HOME: '/root',
app | PM2_USAGE: 'CLI',
app | PM2_INTERACTOR_PROCESSING: 'true' }
http://joxi.ru/krDGM1lHER7XdA
Обсуждают сегодня