I'm trying to deploy my website on digitalocean VPS with git. I created a bare git repository and edited it's hooks/post-receive like this:
#!/bin/sh
git --work-tree=/srv/apps/project --git-dir=/srv/git/project.git checkout -f
NowPath=`pwd`
DeployPath="/srv/apps/project"
cd $DeployPath
pm2 restart project
cd $NowPath
exit 0
But it runs with some errors when I push sth.
remote: [PM2][ERROR] Process project not found
remote: ┌──────────┬────┬──────┬─────┬────────┬─────────┬────────┬─────┬─────┬──────────┐
remote: │ App name │ id │ mode │ pid │ status │ restart │ uptime │ cpu │ mem │ watching │
remote: └──────────┴────┴──────┴─────┴────────┴─────────┴────────┴─────┴─────┴──────────┘
remote: Use `pm2 show <id|name>` to get more details about an app
can everyone help me? I'm very new in this.
thanks in advance.
via Jun
No comments:
Post a Comment