21 lines
494 B
Plaintext
21 lines
494 B
Plaintext
* How to CICD to servers by git
|
|
|
|
** Create empty git repo on each server
|
|
mkdir -p ~/cicd/sisai-world-cicd.git
|
|
cd ~/cicd/sisai-world-cicd.git
|
|
git init --bare
|
|
|
|
** Copy svr_git_hooks_post-receive to ~/cicd/sisai-world-cicd.git/hooks/ on server
|
|
** Edit to fit server env and rename to post-receive
|
|
** chmod +x post-receive
|
|
|
|
** Edit and test code locally
|
|
|
|
** run deploy_XX.sh
|
|
|
|
**(Option)the first time may have to copy and edit .env file on servers
|
|
|
|
* Start node.js:
|
|
pm2 start app.js --name sisai
|
|
|