添加一个 37 game-server env 配置

This commit is contained in:
liangtongchuan
2021-12-26 15:45:53 +08:00
parent 1a625661f3
commit 31c6f61dc1
7 changed files with 73 additions and 9 deletions

5
exclude-file.txt Normal file
View File

@@ -0,0 +1,5 @@
.*
logs
node_modules
dist
bower_components

View File

@@ -46,7 +46,7 @@ filePath.CONFIG_DIR = '/config';
const adminfilePath = _pinus.DEFAULT_ADMIN_PATH;
adminfilePath.ADMIN_FILENAME = 'adminUser';
adminfilePath.ADMIN_USER = 'config/adminUser';
const ALL_ENVS = 'production|development|alpha|dev|isbn|monitor|distribute';
const ALL_ENVS = 'production|development|alpha|dev|isbn|monitor|distribute|sq1';
/**
* 替换全局Promise
* 自动解析sourcemap

View File

@@ -41,5 +41,11 @@ module.exports = {
'gmmongo': 'mongodb://dbop:zyzGm2021@dds-8vb9964bb4cc7f241.mongodb.zhangbei.rds.aliyuncs.com:3717,dds-8vb9964bb4cc7f242.mongodb.zhangbei.rds.aliyuncs.com:3717/zyzgm?replicaSet=mgset-507933150',
'redis': 'r-8vb418l8kkju9sis8k.redis.zhangbei.rds.aliyuncs.com',
'redispw': 'zyz_dev_2021'
}
},
'sq1': {
'mongo': 'mongodb://dbop:zyzSQ2021@dds-8vb7d5060bb271d41.mongodb.zhangbei.rds.aliyuncs.com:3717,dds-8vb7d5060bb271d42.mongodb.zhangbei.rds.aliyuncs.com:3717,dds-8vb7d5060bb271d43.mongodb.zhangbei.rds.aliyuncs.com:3717/zyz?replicaSet=mgset-508112745',
'gmmongo': 'mongodb://dbop:zyzSQ2021@dds-8vb5de93552a67941.mongodb.zhangbei.rds.aliyuncs.com:3717,dds-8vb5de93552a67942.mongodb.zhangbei.rds.aliyuncs.com:3717,dds-8vb5de93552a67943.mongodb.zhangbei.rds.aliyuncs.com:3717/zyz?replicaSet=mgset-508112742',
'redis': 'r-8vb7l1s8ne4vm6v6x6.redis.zhangbei.rds.aliyuncs.com',
'redispw': 'PANl3Vr2eozkq4N2'
},
};

View File

@@ -38,5 +38,10 @@ module.exports = {
'id': 'master-server-1',
'host': '172.26.145.161',
'port': 3005
},
'sq1': {
'id': 'master-server-1',
'host': '127.0.0.1',
'port': 3005
}
};

View File

@@ -26,5 +26,9 @@ module.exports = {
'distribute': {
'type': 'distribute',
'name': '分布式测试'
},
'sq1': {
'type': 'sq1',
'name': '1月功能测试'
}
};

View File

@@ -243,5 +243,43 @@ module.exports = {
'activity': [
{ 'id': 'activity-server-2', 'host': '172.26.145.171', 'port': 9062, "args": " --inspect=9241" },
]
}
},
'sq1': {
'connector': [
{ 'id': 'connector-server-1', 'port': 4050, 'clientHost': 'zyz_monitor.trgame.cn', 'host': '127.0.0.1', 'clientPort': 3050, 'frontend': true },
{ 'id': 'connector-server-2', 'port': 4051, 'clientHost': 'zyz_monitor.trgame.cn', 'host': '127.0.0.1', 'clientPort': 3051, 'frontend': true },
{ 'id': 'connector-server-3', 'port': 4052, 'clientHost': 'zyz_monitor.trgame.cn', 'host': '127.0.0.1', 'clientPort': 3052, 'frontend': true },
],
'chat': [
{ 'id': 'chat-server-1', 'host': '127.0.0.1', 'port': 6050 },
],
'role': [
{ 'id': 'role-server-1', 'host': '127.0.0.1', 'port': 6053 },
{ 'id': 'role-server-2', 'host': '127.0.0.1', 'port': 6061 },
{ 'id': 'role-server-3', 'host': '127.0.0.1', 'port': 6062 },
],
'battle': [
{ 'id': 'battle-server-1', 'host': '127.0.0.1', 'port': 6054 }
],
'gate': [
{ 'id': 'gate-server-1', 'host': '127.0.0.1', 'clientHost': 'zyz_monitor.trgame.cn', 'clientPort': 3014, 'frontend': true },
{ 'id': 'gate-server-2', 'host': '127.0.0.1', 'clientHost': 'zyz_monitor.trgame.cn', 'clientPort': 3015, 'frontend': true }
],
'gm': [
{ 'id': 'gm-server-1', 'host': '127.0.0.1', 'port': 6055 }
],
'systimer': [
{ 'id': 'systimer-server-1', 'host': '127.0.0.1', 'port': 6056 }
],
'guild': [
{ 'id': 'guild-server-1', 'host': '127.0.0.1', 'port': 6057, "args": " --inspect=9239" },
{ 'id': 'guild-server-2', 'host': '127.0.0.1', 'port': 6058, "args": " --inspect=9240" }
],
'activity': [
{ 'id': 'activity-server-1', 'host': '127.0.0.1', 'port': 6059, "args": " --inspect=9241" },
],
'order': [
{ 'id': 'order-server-1', 'host': '127.0.0.1', 'port': 6060, "args": " --inspect=9242" },
]
},
};

View File

@@ -6,21 +6,27 @@ if [ $# != 1 ] ; then
echo "dev: 同步代码到 dev 服务器上,作为测试服供服务开发使用"
echo "monitor: 同步代码到 monitor 服务器上,用做监控和压力测试"
echo "distribute: 同步代码到 distribute 服务器上,用做监控和压力测试"
echo "sq1: 同步代码到 sq1 服务器上,用做 37 功能测试服 game-server 部署"
exit 1;
fi
port=22
if [ ${1} == 'stable' ] ; then
destUrl="root@zyz:/root/zyz/"
elif [ ${1} == 'alpha' ] ; then
destUrl="root@zyzalpha:/root/zyz/"
destUrl="root@zyzalpha:/root/zyz/"
elif [ ${1} == 'dev' ] ; then
destUrl="root@zyzdev:/root/zyz/"
destUrl="root@zyzdev:/root/zyz/"
elif [ ${1} == 'isbn' ] ; then
destUrl="root@zyzisbn:/root/zyz/"
destUrl="root@zyzisbn:/root/zyz/"
elif [ ${1} == 'monitor' ] ; then
destUrl="root@zyzmon:/root/zyz/"
destUrl="root@zyzmon:/root/zyz/"
elif [ ${1} == 'distribute' ] ; then
destUrl="root@zyzdistribute:/root/zyz/"
destUrl="root@zyzdistribute:/root/zyz/"
elif [ ${1} == 'sq1' ] ; then
destUrl="root@sq1:/root/zyz/"
port=3737
else
echo "需要一个参数指明服务器"
exit 1;
@@ -28,7 +34,7 @@ fi
node ./config.js ${1}
rsync -av --include '.babelrc' --include '.eslintrc.js' --exclude '.*' --exclude 'logs' --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}
rsync -av --include '.babelrc' --include '.eslintrc.js' --exclude-from='exclude-file.txt' --progress --inplace --no-owner --no-group --rsh='ssh -p'${port} . ${destUrl}
git checkout ./game-server/config.json
git checkout ./gm-server/config/env
git checkout ./web-server/config/env