1
This commit is contained in:
parent
abf0e6c539
commit
4ea6bddd42
7
scripts/publish_nodejs/boundle.sh
Normal file
7
scripts/publish_nodejs/boundle.sh
Normal 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}
|
@ -7,6 +7,7 @@ module.exports = {
|
|||||||
apps: [{
|
apps: [{
|
||||||
name: appName,
|
name: appName,
|
||||||
args: `-n${n} -i${i}`,
|
args: `-n${n} -i${i}`,
|
||||||
script: script
|
script: script,
|
||||||
|
cwd: 'bin'
|
||||||
}]
|
}]
|
||||||
};
|
};
|
||||||
|
0
scripts/publish_nodejs/reload.sh
Normal file
0
scripts/publish_nodejs/reload.sh
Normal file
14
scripts/publish_nodejs/restart.sh
Executable file
14
scripts/publish_nodejs/restart.sh
Executable 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'
|
Loading…
x
Reference in New Issue
Block a user