Skip to content

Instantly share code, notes, and snippets.

@hoangmirs
Created November 22, 2018 15:52
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save hoangmirs/cbf677c694d58b159f394a0160bbc4f2 to your computer and use it in GitHub Desktop.
Save hoangmirs/cbf677c694d58b159f394a0160bbc4f2 to your computer and use it in GitHub Desktop.
Nuxt ecosystem.config.js
module.exports = {
apps: [
{
name: "API",
script: "yarn",
cwd: "/home/deploy/hoang_app/current",
error_file: "/home/deploy/hoang_app/logs/web.err.log",
out_file: "/home/deploy/hoang_app/logs/web.out.log",
// Options reference: https://pm2.io/doc/en/runtime/reference/ecosystem-file/
args: "start",
instances: 1,
autorestart: true,
watch: false,
max_memory_restart: "300M",
env: {
NODE_ENV: "development"
},
env_production: {
NODE_ENV: "production"
}
}
],
deploy: {
production: {
user: "deploy",
host: "192.168.13.3",
ref: "origin/develop",
repo: "git@bitbucket.org:hoang_app/malog-nuxt.git",
path: "/home/deploy/hoang_fe/",
"pre-deploy": "git fetch --all",
"post-deploy": "yarn install && yarn build && pm2 reload ecosystem.config.js --env production"
}
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment