forever 替换成pm2

This commit is contained in:
aixianling
2023-06-09 17:45:10 +08:00
parent adc58b3e0d
commit 857825af4a
3 changed files with 36 additions and 5 deletions

31
pm2.config.js Normal file
View File

@@ -0,0 +1,31 @@
module.exports = {
apps: [
{
name: 'dev',
script: "index.js",
watch: ["src", "tpl"],
ignore_watch: ["node_modules"],
shutdown_with_message: true,
env: {
"NODE_ENV": "development",
}
},
{
name: 'oms-node',
script: "index.js",
env: {
"NODE_ENV": "production",
}
}
],
deploy: {
production: {
user: 'root',
host: '192.168.1.87',
ref: 'origin/dev',
repo: 'http://git.sinoecare.com/lab/dvcp-node-service.git',
path: '/home/deploy',
postDeploy: "npm run pro"
}
}
}