doc-pm2
doc-pm2 copied to clipboard
Easy Deploy With SSH | Guide | PM2 Documentation
https://pm2.io/doc/en/runtime/guide/easy-deploy-with-ssh/
PM2 - Guide, References, Tutorials and Best Practices about PM2 and Node.js.
"git --version " can print "git version 2.9.5" at remote server ,but when i use "pm2 deploy ecosystem.js production setup",it happen a error "bash: git: command not found "
i use "yum install git -y " again. it is Okay now .
Please put as simple as posible how to use pm2 to run a node appliaction as sudo It must be possible to use inline keyword pm2 start sudo myap
hello Excuse me, when I try to deploy my api with pm2 I receive this error: spawn sh ENOENT I know the problem come from my ecosystem file but i don't know why.
Please help me with this. Thank you!
Hi, on my system I get "unexpected token -" until I quote the ecosystem.config.js file options that contain "-", like:
pre-setup: "ls -la" won't work until I make it "pre-setup": "ls -la"
Message:
when you want to pull the latest version of commit at host, you need to config like this:
'post-deploy': 'git pull origin master;',
only config in 'post-deploy', git pull latest version of commit works.
I don't get it, how can you all forget about the webpack or gulp, we do not deploy full source code from github to remote server, is there any ways we can use the webpack or gulp (build system) before it deploys to the remote server. Any suggestions will be welcome, thanks in advance.
@kangchen I don't get it, how can you all forget about the webpack or gulp, we do not deploy full source code from github to remote server, is there any ways we can use the webpack or gulp (build system) before it deploys to the remote server. Any suggestions will be welcome, thanks in advance.
Yep you are right, there must be a way out to deploy using webpack or gulp. I'll be looking into this, and update here, if got some success.
@kangchen I don't get it, how can you all forget about the webpack or gulp, we do not deploy full source code from github to remote server, is there any ways we can use the webpack or gulp (build system) before it deploys to the remote server. Any suggestions will be welcome, thanks in advance.
I just build in my local workspace first, and use command npm run ftp
to upload files to the remote server with a ftp plugin.
can 'pm2 start ecosystem.config.js' specify a host like 'pm2 start ecosystem.config.js --host ... ' ? or shold I use deploy to specify a host?
What if the apps are in different repos, how to deploy them by using one ecosystem file ? Or should I write a ecosystem file for each app ?
hi i get sh: 1: Syntax error: Unterminated quoted string
on my remote host, you have any idea why you could be?
@kangchen I don't get it, how can you all forget about the webpack or gulp, we do not deploy full source code from github to remote server, is there any ways we can use the webpack or gulp (build system) before it deploys to the remote server. Any suggestions will be welcome, thanks in advance.
@muneebrbaig
@kangchen I don't get it, how can you all forget about the webpack or gulp, we do not deploy full source code from github to remote server, is there any ways we can use the webpack or gulp (build system) before it deploys to the remote server. Any suggestions will be welcome, thanks in advance.
Yep you are right, there must be a way out to deploy using webpack or gulp. I'll be looking into this, and update here, if got some success.
People might not like what I have to say, but coming from 10 years in SysAdmin, Operations, DevOps, and JS Coding...I wouldn't be deploying anything other than an already-transpiled/bundled JS build to my target systems. I'd simply invoke pm2 for deployment after building.
In your head, just so that I don't sound insensitive or like the assholes on StackOverflow, where would you see gulp/webpack fitting into the pm2 flow?
@justinphilpott Hi, on my system I get "unexpected token -" until I quote the ecosystem.config.js file options that contain "-", like:
pre-setup: "ls -la" won't work until I make it "pre-setup": "ls -la"
because JSON doens't support hyphens in key names until you make them in quotes :)