通过git&webhook部署上线应用
git clone https://github.com/huzhengquan/WebHookDeployer.git
mv config.json.sample config.json
edit config.json
{
"port": 3000,
"tasks": {
"task_id":{
"filter":{
"token": "efb"
}
"command": "date && sleep 10 && date"
}
}
}
webhook的网址:
http://hostname:port/:task_id
:task_id
对应的是config['tasks']
的key。
node app.js # pm2 start app.js