feat(config): 添加公测自营大区配置

This commit is contained in:
liangtongchuan
2023-04-08 21:16:19 +08:00
parent 94614cc96a
commit cbf2bd28f8
10 changed files with 581 additions and 3 deletions

View File

@@ -53,7 +53,7 @@ filePath.CONFIG_DIR = '/config';
const adminfilePath = _pinus.DEFAULT_ADMIN_PATH;
adminfilePath.ADMIN_FILENAME = 'adminUser';
adminfilePath.ADMIN_USER = 'config/adminUser';
const ALL_ENVS = 'stable|development|alpha|dev|isbn|isbnhk|monitor|monitor2|distribute|sq1|sq3|sq4|sq7|sq9';
const ALL_ENVS = 'stable|development|alpha|dev|isbn|isbnhk|monitor|monitor2|distribute|sq1|sq3|sq4|sq7|sq9|zy1';
/**
* 替换全局Promise
* 自动解析sourcemap

View File

@@ -84,4 +84,10 @@ module.exports = {
'redis': 'r-8vbjy2v5jepcsozyum.redis.zhangbei.rds.aliyuncs.com',
'redispw': 'hWCJ$HDajm9SN&&Z'
},
'zy1': { // 真实连接未准备好,暂时 copy sq9待替换
'mongo': 'mongodb://dbop:zyzSQ92023@dds-8vb6eea40c3207641.mongodb.zhangbei.rds.aliyuncs.com:3717,dds-8vb6eea40c3207642.mongodb.zhangbei.rds.aliyuncs.com:3717/zyz?replicaSet=mgset-515389269',
'gmmongo': 'mongodb://dbop:zyzSQGm2021@dds-8vb5de93552a67941.mongodb.zhangbei.rds.aliyuncs.com:3717,dds-8vb5de93552a67942.mongodb.zhangbei.rds.aliyuncs.com:3717,dds-8vb5de93552a67943.mongodb.zhangbei.rds.aliyuncs.com:3717/zyzgm?readPreference=secondary&replicaSet=mgset-508112742',
'redis': 'r-8vbjy2v5jepcsozyum.redis.zhangbei.rds.aliyuncs.com',
'redispw': 'hWCJ$HDajm9SN&&Z'
}
};

View File

@@ -98,5 +98,30 @@ module.exports = {
'id': 'master-server-1',
'host': '172.16.4.126',
'port': 3005
}
},
'zy1': { // zy1 - zy5, env: zy1
'id': 'master-server-1',
'host': '172.16.4.140',
'port': 3005
},
'zy2': {
'id': 'master-server-1',
'host': '172.16.4.140',
'port': 3005
},
'zy3': {
'id': 'master-server-1',
'host': '172.16.4.140',
'port': 3005
},
'zy4': {
'id': 'master-server-1',
'host': '172.16.4.140',
'port': 3005
},
'zy5': {
'id': 'master-server-1',
'host': '172.16.4.140',
'port': 3005
},
};

View File

@@ -1,3 +1,5 @@
import { zy1, zy2, zy3, zy4, zy5 } from "./yjz_zy";
module.exports = {
'development': {
'connector': [
@@ -625,4 +627,9 @@ module.exports = {
'activity': [],
'order': [],
},
'zy1': zy1,
'zy2': zy2,
'zy3': zy3,
'zy4': zy4,
'zy5': zy5,
};

View File

@@ -0,0 +1,228 @@
// 自营服务器 1 配置
export const zy1 = {
'connector': [
{ 'id': 'connector-server-1', 'port': 4051, 'clientHost': 'yjz-zy-game1.yev242.com', 'host': '172.16.4.140', 'clientPort': 3051, 'frontend': true },
{ 'id': 'connector-server-2', 'port': 4052, 'clientHost': 'yjz-zy-game1.yev242.com', 'host': '172.16.4.140', 'clientPort': 3052, 'frontend': true },
{ 'id': 'connector-server-3', 'port': 4053, 'clientHost': 'yjz-zy-game1.yev242.com', 'host': '172.16.4.140', 'clientPort': 3053, 'frontend': true },
{ 'id': 'connector-server-4', 'port': 4054, 'clientHost': 'yjz-zy-game1.yev242.com', 'host': '172.16.4.140', 'clientPort': 3054, 'frontend': true },
{ 'id': 'connector-server-5', 'port': 4055, 'clientHost': 'yjz-zy-game1.yev242.com', 'host': '172.16.4.140', 'clientPort': 3055, 'frontend': true },
{ 'id': 'connector-server-6', 'port': 4056, 'clientHost': 'yjz-zy-game1.yev242.com', 'host': '172.16.4.140', 'clientPort': 3056, 'frontend': true },
],
'chat': [
{ 'id': 'chat-server-1', 'host': '172.16.4.140', 'port': 6011 },
{ 'id': 'chat-server-2', 'host': '172.16.4.140', 'port': 6012 },
],
'role': [
{ 'id': 'role-server-1', 'host': '172.16.4.140', 'port': 6021 },
{ 'id': 'role-server-2', 'host': '172.16.4.140', 'port': 6022 },
{ 'id': 'role-server-3', 'host': '172.16.4.140', 'port': 6023 },
{ 'id': 'role-server-4', 'host': '172.16.4.140', 'port': 6024 },
{ 'id': 'role-server-5', 'host': '172.16.4.140', 'port': 6025 },
{ 'id': 'role-server-6', 'host': '172.16.4.140', 'port': 6026 },
],
'battle': [
{ 'id': 'battle-server-1', 'host': '172.16.4.140', 'port': 6031 },
{ 'id': 'battle-server-2', 'host': '172.16.4.140', 'port': 6032 },
],
'gm': [],
'systimer': [],
'guild': [
{ 'id': 'guild-server-1', 'host': '172.16.4.140', 'port': 6041 },
{ 'id': 'guild-server-2', 'host': '172.16.4.140', 'port': 6042 },
{ 'id': 'guild-server-3', 'host': '172.16.4.140', 'port': 6043 },
{ 'id': 'guild-server-4', 'host': '172.16.4.140', 'port': 6044 },
{ 'id': 'guild-server-5', 'host': '172.16.4.140', 'port': 6045 },
{ 'id': 'guild-server-6', 'host': '172.16.4.140', 'port': 6046 },
],
'activity': [
{ 'id': 'activity-server-1', 'host': '172.16.4.140', 'port': 6051 },
{ 'id': 'activity-server-2', 'host': '172.16.4.140', 'port': 6052 },
],
'order': [
{ 'id': 'order-server-1', 'host': '172.16.4.140', 'port': 6061 },
{ 'id': 'order-server-2', 'host': '172.16.4.140', 'port': 6062 },
]
};
// 自营服务器 2 配置
export const zy2 = {
'connector': [
{ 'id': 'connector-server-7', 'port': 4051, 'clientHost': 'yjz-zy-game2.yev242.com', 'host': '172.16.4.146', 'clientPort': 3051, 'frontend': true },
{ 'id': 'connector-server-8', 'port': 4052, 'clientHost': 'yjz-zy-game2.yev242.com', 'host': '172.16.4.146', 'clientPort': 3052, 'frontend': true },
{ 'id': 'connector-server-9', 'port': 4053, 'clientHost': 'yjz-zy-game2.yev242.com', 'host': '172.16.4.146', 'clientPort': 3053, 'frontend': true },
{ 'id': 'connector-server-10', 'port': 4054, 'clientHost': 'yjz-zy-game2.yev242.com', 'host': '172.16.4.146', 'clientPort': 3054, 'frontend': true },
],
'chat': [
{ 'id': 'chat-server-3', 'host': '172.16.4.146', 'port': 6011 },
{ 'id': 'chat-server-4', 'host': '172.16.4.146', 'port': 6012 },
],
'role': [
{ 'id': 'role-server-7', 'host': '172.16.4.146', 'port': 6021 },
{ 'id': 'role-server-8', 'host': '172.16.4.146', 'port': 6022 },
{ 'id': 'role-server-9', 'host': '172.16.4.146', 'port': 6023 },
{ 'id': 'role-server-10', 'host': '172.16.4.146', 'port': 6024 },
],
'battle': [
{ 'id': 'battle-server-3', 'host': '172.16.4.146', 'port': 6031 },
{ 'id': 'battle-server-4', 'host': '172.16.4.146', 'port': 6032 },
{ 'id': 'battle-server-5', 'host': '172.16.4.146', 'port': 6033 },
{ 'id': 'battle-server-6', 'host': '172.16.4.146', 'port': 6034 },
],
'gm': [
{ 'id': 'gm-server-1', 'host': '172.16.4.146', 'port': 6071 },
],
'systimer': [
{ 'id': 'systimer-server-1', 'host': '172.16.4.146', 'port': 6081 },
],
'guild': [],
'activity': [
{ 'id': 'activity-server-3', 'host': '172.16.4.146', 'port': 6051 },
{ 'id': 'activity-server-4', 'host': '172.16.4.146', 'port': 6052 },
{ 'id': 'activity-server-5', 'host': '172.16.4.146', 'port': 6053 },
],
'order': [
{ 'id': 'order-server-3', 'host': '172.16.4.146', 'port': 6061 },
{ 'id': 'order-server-4', 'host': '172.16.4.146', 'port': 6062 },
],
};
// 自营服务器 3 配置
export const zy3 = {
'connector': [
{ 'id': 'connector-server-11', 'port': 4051, 'clientHost': 'yjz-zy-game3.yev242.com', 'host': '172.16.4.142', 'clientPort': 3051, 'frontend': true },
{ 'id': 'connector-server-12', 'port': 4052, 'clientHost': 'yjz-zy-game3.yev242.com', 'host': '172.16.4.142', 'clientPort': 3052, 'frontend': true },
{ 'id': 'connector-server-gm', 'port': 4099, 'clientHost': 'yjz-zy-game3.yev242.com', 'host': '172.16.4.142', 'clientPort': 3099, 'frontend': true, 'isGM': 'true' }
],
'chat': [
{ 'id': 'chat-server-5', 'host': '172.16.4.142', 'port': 6011 },
{ 'id': 'chat-server-6', 'host': '172.16.4.142', 'port': 6012 },
],
'role': [
{ 'id': 'role-server-11', 'host': '172.16.4.142', 'port': 6021 },
{ 'id': 'role-server-12', 'host': '172.16.4.142', 'port': 6022 },
{ 'id': 'role-server-13', 'host': '172.16.4.142', 'port': 6023 },
{ 'id': 'role-server-14', 'host': '172.16.4.142', 'port': 6024 },
{ 'id': 'role-server-15', 'host': '172.16.4.142', 'port': 6025 },
{ 'id': 'role-server-16', 'host': '172.16.4.142', 'port': 6026 },
],
'battle': [
{ 'id': 'battle-server-7', 'host': '172.16.4.142', 'port': 6031 },
{ 'id': 'battle-server-8', 'host': '172.16.4.142', 'port': 6032 },
{ 'id': 'battle-server-9', 'host': '172.16.4.142', 'port': 6033 },
{ 'id': 'battle-server-10', 'host': '172.16.4.142', 'port': 6034 },
],
'gm': [
{ 'id': 'gm-server-2', 'host': '172.16.4.142', 'port': 6071 },
{ 'id': 'gm-server-3', 'host': '172.16.4.142', 'port': 6072 },
],
'systimer': [],
'guild': [
{ 'id': 'guild-server-7', 'host': '172.16.4.142', 'port': 6041 },
{ 'id': 'guild-server-8', 'host': '172.16.4.142', 'port': 6042 },
{ 'id': 'guild-server-9', 'host': '172.16.4.142', 'port': 6043 },
{ 'id': 'guild-server-10', 'host': '172.16.4.142', 'port': 6044 },
{ 'id': 'guild-server-11', 'host': '172.16.4.142', 'port': 6045 },
{ 'id': 'guild-server-12', 'host': '172.16.4.142', 'port': 6046 },
],
'activity': [],
'order': [
{ 'id': 'order-server-5', 'host': '172.16.4.142', 'port': 6061 },
{ 'id': 'order-server-6', 'host': '172.16.4.142', 'port': 6062 },
],
};
// 自营服务器 4 配置
export const zy4 = {
'connector': [
{ 'id': 'connector-server-13', 'port': 4051, 'clientHost': 'yjz-zy-game4.yev242.com', 'host': '172.16.4.145', 'clientPort': 3051, 'frontend': true },
{ 'id': 'connector-server-14', 'port': 4052, 'clientHost': 'yjz-zy-game4.yev242.com', 'host': '172.16.4.145', 'clientPort': 3052, 'frontend': true },
{ 'id': 'connector-server-15', 'port': 4053, 'clientHost': 'yjz-zy-game4.yev242.com', 'host': '172.16.4.145', 'clientPort': 3053, 'frontend': true },
{ 'id': 'connector-server-16', 'port': 4054, 'clientHost': 'yjz-zy-game4.yev242.com', 'host': '172.16.4.145', 'clientPort': 3054, 'frontend': true },
{ 'id': 'connector-server-17', 'port': 4055, 'clientHost': 'yjz-zy-game4.yev242.com', 'host': '172.16.4.145', 'clientPort': 3055, 'frontend': true },
{ 'id': 'connector-server-18', 'port': 4056, 'clientHost': 'yjz-zy-game4.yev242.com', 'host': '172.16.4.145', 'clientPort': 3056, 'frontend': true },
],
'chat': [
{ 'id': 'chat-server-7', 'host': '172.16.4.145', 'port': 6011 },
{ 'id': 'chat-server-8', 'host': '172.16.4.145', 'port': 6012 },
],
'role': [
{ 'id': 'role-server-17', 'host': '172.16.4.145', 'port': 6021 },
{ 'id': 'role-server-18', 'host': '172.16.4.145', 'port': 6022 },
{ 'id': 'role-server-19', 'host': '172.16.4.145', 'port': 6023 },
{ 'id': 'role-server-20', 'host': '172.16.4.145', 'port': 6024 },
{ 'id': 'role-server-21', 'host': '172.16.4.145', 'port': 6025 },
{ 'id': 'role-server-22', 'host': '172.16.4.145', 'port': 6026 },
],
'battle': [
{ 'id': 'battle-server-11', 'host': '172.16.4.145', 'port': 6031 },
{ 'id': 'battle-server-12', 'host': '172.16.4.145', 'port': 6032 },
],
'gm': [],
'systimer': [],
'guild': [
{ 'id': 'guild-server-13', 'host': '172.16.4.145', 'port': 6041 },
{ 'id': 'guild-server-14', 'host': '172.16.4.145', 'port': 6042 },
{ 'id': 'guild-server-15', 'host': '172.16.4.145', 'port': 6043 },
{ 'id': 'guild-server-16', 'host': '172.16.4.145', 'port': 6044 },
{ 'id': 'guild-server-17', 'host': '172.16.4.145', 'port': 6045 },
{ 'id': 'guild-server-18', 'host': '172.16.4.145', 'port': 6046 },
],
'activity': [
{ 'id': 'activity-server-6', 'host': '172.16.4.145', 'port': 6051 },
{ 'id': 'activity-server-7', 'host': '172.16.4.145', 'port': 6052 },
{ 'id': 'activity-server-8', 'host': '172.16.4.145', 'port': 6053 },
],
'order': [
{ 'id': 'order-server-7', 'host': '172.16.4.145', 'port': 6061 },
{ 'id': 'order-server-8', 'host': '172.16.4.145', 'port': 6062 },
]
};
// 自营服务器 5 配置
export const zy5 = {
'connector': [
{ 'id': 'connector-server-19', 'port': 4051, 'clientHost': 'yjz-zy-game5.yev242.com', 'host': '172.16.4.141', 'clientPort': 3051, 'frontend': true },
{ 'id': 'connector-server-20', 'port': 4052, 'clientHost': 'yjz-zy-game5.yev242.com', 'host': '172.16.4.141', 'clientPort': 3052, 'frontend': true },
{ 'id': 'connector-server-21', 'port': 4053, 'clientHost': 'yjz-zy-game5.yev242.com', 'host': '172.16.4.141', 'clientPort': 3053, 'frontend': true },
{ 'id': 'connector-server-22', 'port': 4054, 'clientHost': 'yjz-zy-game5.yev242.com', 'host': '172.16.4.141', 'clientPort': 3054, 'frontend': true },
{ 'id': 'connector-server-23', 'port': 4055, 'clientHost': 'yjz-zy-game5.yev242.com', 'host': '172.16.4.141', 'clientPort': 3055, 'frontend': true },
{ 'id': 'connector-server-24', 'port': 4056, 'clientHost': 'yjz-zy-game5.yev242.com', 'host': '172.16.4.141', 'clientPort': 3056, 'frontend': true },
],
'chat': [
{ 'id': 'chat-server-9', 'host': '172.16.4.141', 'port': 6011 },
{ 'id': 'chat-server-10', 'host': '172.16.4.141', 'port': 6012 },
],
'role': [
{ 'id': 'role-server-23', 'host': '172.16.4.141', 'port': 6021 },
{ 'id': 'role-server-24', 'host': '172.16.4.141', 'port': 6022 },
{ 'id': 'role-server-25', 'host': '172.16.4.141', 'port': 6023 },
{ 'id': 'role-server-26', 'host': '172.16.4.141', 'port': 6024 },
{ 'id': 'role-server-27', 'host': '172.16.4.141', 'port': 6025 },
{ 'id': 'role-server-28', 'host': '172.16.4.141', 'port': 6026 },
],
'battle': [
{ 'id': 'battle-server-13', 'host': '172.16.4.141', 'port': 6031 },
{ 'id': 'battle-server-14', 'host': '172.16.4.141', 'port': 6032 },
],
'gm': [],
'systimer': [],
'guild': [
{ 'id': 'guild-server-19', 'host': '172.16.4.141', 'port': 6041 },
{ 'id': 'guild-server-20', 'host': '172.16.4.141', 'port': 6042 },
{ 'id': 'guild-server-21', 'host': '172.16.4.141', 'port': 6043 },
{ 'id': 'guild-server-22', 'host': '172.16.4.141', 'port': 6044 },
{ 'id': 'guild-server-23', 'host': '172.16.4.141', 'port': 6045 },
{ 'id': 'guild-server-24', 'host': '172.16.4.141', 'port': 6046 },
],
'activity': [
{ 'id': 'activity-server-9', 'host': '172.16.4.141', 'port': 6051 },
{ 'id': 'activity-server-10', 'host': '172.16.4.141', 'port': 6052 },
{ 'id': 'activity-server-11', 'host': '172.16.4.141', 'port': 6053 },
{ 'id': 'activity-server-12', 'host': '172.16.4.141', 'port': 6054 },
],
'order': [
{ 'id': 'order-server-9', 'host': '172.16.4.141', 'port': 6061 },
{ 'id': 'order-server-10', 'host': '172.16.4.141', 'port': 6062 },
]
};

View File

@@ -0,0 +1,190 @@
module.exports = {
'appenders': {
'console': {
'type': 'console'
},
'con-log': {
'type': 'file',
'filename': '/zyz_logs/log4js/con-log-${opts:serverId}.log',
'pattern': 'connector',
'maxLogSize': 104857600,
'layout': {
'type': 'basic'
},
'backups': 5
},
'rpc-log': {
'type': 'file',
'filename': '/zyz_logs/log4js/rpc-log-${opts:serverId}.log',
'maxLogSize': 104857600,
'layout': {
'type': 'basic'
},
'backups': 5
},
'forward-log': {
'type': 'file',
'filename': '/zyz_logs/log4js/forward-log-${opts:serverId}.log',
'maxLogSize': 104857600,
'layout': {
'type': 'basic'
},
'backups': 5
},
'rpc-debug': {
'type': 'file',
'filename': '/zyz_logs/log4js/rpc-debug-${opts:serverId}.log',
'maxLogSize': 104857600,
'layout': {
'type': 'basic'
},
'backups': 5
},
'crash-log': {
'type': 'file',
'filename': '/zyz_logs/log4js/crash.log',
'maxLogSize': 104857600,
'layout': {
'type': 'basic'
},
'backups': 5
},
'admin-log': {
'type': 'file',
'filename': '/zyz_logs/log4js/admin.log',
'maxLogSize': 104857600,
'layout': {
'type': 'basic'
},
'backups': 5
},
'pinus': {
'type': 'file',
'filename': '/zyz_logs/log4js/pinus-${opts:serverId}.log',
'maxLogSize': 1073741824,
'layout': {
'type': 'basic'
},
'backups': 20
},
'pinus-admin': {
'type': 'file',
'filename': '/zyz_logs/log4js/pinus-admin.log',
'maxLogSize': 104857600,
'layout': {
'type': 'basic'
},
'backups': 5
},
'pinus-rpc': {
'type': 'file',
'filename': '/zyz_logs/log4js/pinus-rpc-${opts:serverId}.log',
'maxLogSize': 104857600,
'layout': {
'type': 'basic'
},
'backups': 5
},
'app': {
'type': 'file',
'filename': '/zyz_logs/sls/app.log',
'maxLogSize': 1073741824,
'layout': {
'type': 'basic'
},
'backups': 20
},
'error': {
'type': 'file',
'filename': '/zyz_logs/sls/error.log',
'maxLogSize': 1073741824,
'layout': {
'type': 'basic'
},
'backups': 5
},
'ta': {
'type': 'file',
'filename': '/zyz_logs/ta/log',
'pattern': 'yyyy-MM-dd-hh',
'alwaysIncludePattern': true,
'layout': {
'type': 'pattern',
'pattern': '%m',
},
'backups': 240,
},
'item': {
'type': 'file',
'filename': '/zyz_logs/item/log',
'maxLogSize': 1073741824,
'layout': {
'type': 'basic'
},
'backups': 5
}
},
'categories': {
'default': {
'appenders': ['console', 'pinus'],
'level': 'debug'
},
'con-log': {
'appenders': ['con-log'],
'level': 'debug'
},
'rpc-log': {
'appenders': ['rpc-log'],
'level': 'debug'
},
'forward-log': {
'appenders': ['forward-log'],
'level': 'debug'
},
'rpc-debug': {
'appenders': ['rpc-debug'],
'level': 'debug'
},
'crash-log': {
'appenders': ['crash-log'],
'level': 'debug'
},
'admin-log': {
'appenders': ['admin-log'],
'level': 'debug'
},
'pinus-admin': {
'appenders': ['pinus-admin'],
'level': 'debug'
},
'pinus-rpc': {
'appenders': ['pinus-rpc'],
'level': 'debug'
},
'pinus': {
'appenders': ['pinus'],
'level': 'debug'
},
'info': {
'appenders': ['console', 'app'],
'level': 'debug'
},
'err': {
'appenders': ['console', 'error'],
'level': 'debug'
},
'ta': {
'appenders': ['console', 'ta'],
'level': 'info'
},
'item': {
'appenders': ['console', 'item'],
'level': 'info'
}
},
'replaceConsole': true,
'lineDebug': false,
'errorStack': true
};

View File

@@ -62,7 +62,7 @@ pm2Master.args.push('port='+masterConfig.port);
pm2Master.args.push('env='+envType);
pm2Master.args.push('mode=stand-alone');
pm2Master.cwd= cwd;
let onairEnvs = ['sq1', 'sq3', 'sq4', 'sq7', 'sq9'];
let onairEnvs = ['sq1', 'sq3', 'sq4', 'sq7', 'sq9', 'zy1'];
if(onairEnvs.indexOf(envType) > -1) {
pm2Master.out_file = '/zyz_logs/pm2/'+masterConfig.id+"_app.log";
pm2Master.error_file='/zyz_logs/pm2/'+masterConfig.id+'_error.log';

View File

@@ -0,0 +1,52 @@
import { EggAppConfig, EggAppInfo, PowerPartial } from 'egg';
import defaultConfig from './config.default';
// ! 数据库地址尚未就位
export default (appInfo: EggAppInfo) => {
const config = {} as PowerPartial<EggAppConfig>;
// add your special config in here
config.mongoose = {
url: '', // 内网
options: { useNewUrlParser: true, useUnifiedTopology: true },
};
config.gmmongoose = {
url: '', // 内网
options: { useNewUrlParser: true, useUnifiedTopology: true },
};
config.redis = {
url: '', // 内网
pw: ''
};
config.xtransit = {
server: 'ws://172.16.4.109:9092',
appId: 5,
appSecret: '4441a80f2516a879fa3e4c7c096ab4f1'
};
config.customLogger = {
linkLogger: {
file: '/zyz_logs/gm-server/link-log.log',
formatter(meta) {
return `[${meta.level}] [${meta.date}] ${meta.message}`;
},
},
};
config.logrotator = {
filesRotateBySize: [
'/zyz_logs/gm-server/link-log.log',
],
maxFileSize: 1024,
};
// the return config will combines to EggAppConfig
return {
...defaultConfig(appInfo),
...config,
};
};

View File

@@ -7,6 +7,7 @@ if [ $# != 1 ] ; then
echo "monitor: 同步代码到 monitor 服务器上,用做监控和压力测试"
echo "distribute: 同步代码到 distribute 服务器上,用做监控和压力测试"
echo "sq1: 同步代码到 sq1 服务器上,用做 37 功能测试服 game-server 部署"
echo "zyx: 同步代码到 zyx 服务器上,用做公测自营大区 game-server 部署"
exit 1;
fi
@@ -68,6 +69,26 @@ elif [ ${1} == 'sq10' ] ; then
destUrl="root@sq10:/root/zyz/"
port=22
env='sq9'
elif [ ${1} == 'zy1' ] ; then
destUrl="root@yjz-zy-game1:/root/zyz/"
port=22
env='zy1'
elif [ ${1} == 'zy2' ] ; then
destUrl="root@yjz-zy-game2:/root/zyz/"
port=22
env='zy1'
elif [ ${1} == 'zy3' ] ; then
destUrl="root@yjz-zy-game3:/root/zyz/"
port=22
env='zy1'
elif [ ${1} == 'zy4' ] ; then
destUrl="root@yjz-zy-game4:/root/zyz/"
port=22
env='zy1'
elif [ ${1} == 'zy5' ] ; then
destUrl="root@yjz-zy-game5:/root/zyz/"
port=22
env='zy1'
else
echo "需要一个参数指明服务器"
exit 1;

View File

@@ -0,0 +1,49 @@
import { EggAppConfig, EggAppInfo, PowerPartial } from 'egg';
import defaultConfig from './config.default';
// ! 数据库地址尚未就位
export default (appInfo: EggAppInfo) => {
const config = {} as PowerPartial<EggAppConfig>;
config.mongoose = {
url: '', // 内网
options: { useNewUrlParser: true, useUnifiedTopology: true },
};
config.gmmongoose = {
url: '', // 内网
options: { useNewUrlParser: true, useUnifiedTopology: true },
};
config.redis = {
url: '', // 内网
pw: ''
};
config.xtransit = {
server: 'ws://172.16.4.109:9092',
appId: 2,
appSecret: '103981eb5b7781fedea116ece0ee00ac'
};
config.customLogger = {
linkLogger: {
file: '/zyz_logs/web-server/link-log.log',
formatter(meta) {
return `[${meta.level}] [${meta.date}] ${meta.message}`;
},
},
};
config.logrotator = {
filesRotateBySize: [
'/zyz_logs/web-server/link-log.log',
],
maxFileSize: 1024 * 1024 * 1024,
};
// the return config will combines to EggAppConfig
return {
...defaultConfig(appInfo),
...config
};
};