module.exports = {
apps : [{
name: 'example.ru',
script: 'node_modules/.bin/nuxt',
args: 'start --hostname YOUR_HOST -p 4000',
instances: 1,
autorestart: true,
watch: false,
max_memory_restart: '1G',
env: {
NODE_ENV: 'development'
},
env_production: {
NODE_ENV: 'production'
}
}],
deploy : {
production : {
user : 'YOUR_USER',
host : 'YOUR_HOST,
ref : 'origin/master',
repo : 'YOUR_REPO',
path : '/home/USER/PATH',
//'post-deploy' : 'npm install && pm2 reload ecosystem.config.js --env production'
'post-deploy' : 'yarn install && yarn build && pm2 reload ecosystem.config.js --env production'
}
}
};