This commit is contained in:
aozhiwei 2022-04-14 23:17:05 +08:00
parent abf0e6c539
commit 4ea6bddd42
4 changed files with 23 additions and 1 deletions

View File

@ -0,0 +1,7 @@
source ./common.sh
tag_name=`git status |grep '# On branch '|sed 's/# On branch //g'`
dir_name=`basename $PWD`
package_name=${dir_name}.tar.gz
tar --exclude=*.git -chzf target/${package_name} bin common.sh reload.sh restart.sh ecosystem.config.js config ${EXT_PKG_FILES}

View File

@ -7,6 +7,7 @@ module.exports = {
apps: [{
name: appName,
args: `-n${n} -i${i}`,
script: script
script: script,
cwd: 'bin'
}]
};

View File

View File

@ -0,0 +1,14 @@
#!/bin/bash
source ./common.sh
instances=(${1//,/ })
n=$2
for i in ${instances[@]}
do
pm2 delete ecosystem.config.js --only ${PROJECT_NAME}_n${n}_i${i} $n $i ${PROJECT_NAME}
pm2 start ecosystem.config.js --only ${PROJECT_NAME}_n${n}_i${i} $n $i ${PROJECT_NAME}
done
echo 'success'