环境:增加监控服务器配置

部署:修改 pm2 启动相关文件
This commit is contained in:
liangtongchuan
2021-04-20 14:57:52 +08:00
parent fb52dfbfda
commit 011335ff1f
14 changed files with 337 additions and 5 deletions
+4 -1
View File
@@ -4,6 +4,7 @@ if [ $# != 1 ] ; then
echo "stable: 同步代码到 stable 服务器上,作为正式服使用"
echo "alpha: 同步代码到 alpha 服务器上,作为测试服供服务开发使用"
echo "dev: 同步代码到 dev 服务器上,作为测试服供服务开发使用"
echo "monitor: 同步代码到 monitor 服务器上,用做监控和压力测试"
exit 1;
fi
@@ -15,6 +16,8 @@ elif [ ${1} == 'dev' ] ; then
destUrl="root@zyzdev:/root/zyz/"
elif [ ${1} == 'isbn' ] ; then
destUrl="root@zyzisbn:/root/zyz/"
elif [ ${1} == 'monitor' ] ; then
destUrl="root@zyzmon:/root/zyz/"
else
echo "需要一个参数指明服务器"
exit 1;
@@ -23,4 +26,4 @@ fi
node ./game-server/config.js ${1}
rsync -av --include '.babelrc' --include '.eslintrc.js' --exclude '.*' --exclude './game-server/node_modules' --exclude './game-server/node_modules' --exclude './game-server/dist' --exclude 'node_modules' --exclude 'bower_components' --exclude 'dist' --progress --inplace --no-owner --no-group --rsh='ssh -p22' . ${destUrl}
git checkout ./game-server/config.json
git checkout ./game-server/config.json