配置:修改host为域名
This commit is contained in:
@@ -30,6 +30,7 @@ import { resResult, genCode } from './app/pubUtils/util';
|
|||||||
import { errlogger, infologger } from './app/util/logger';
|
import { errlogger, infologger } from './app/util/logger';
|
||||||
import { connectThinkingData, getTire } from './app/services/sdkService';
|
import { connectThinkingData, getTire } from './app/services/sdkService';
|
||||||
import { loadGmDb } from './app/db';
|
import { loadGmDb } from './app/db';
|
||||||
|
const fs = require('fs');
|
||||||
|
|
||||||
const filePath = (_pinus as any).FILEPATH;
|
const filePath = (_pinus as any).FILEPATH;
|
||||||
filePath.MASTER = '/config/master';
|
filePath.MASTER = '/config/master';
|
||||||
@@ -112,6 +113,22 @@ app.configure(ALL_ENVS, 'connector', function () {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// wss加密
|
||||||
|
// app.configure('sq1', 'connector', function() {
|
||||||
|
// app.set('connectorConfig',
|
||||||
|
// {
|
||||||
|
// connector: pinus.connectors.hybridconnector,
|
||||||
|
// heartbeat: 60,
|
||||||
|
// useDict: true,
|
||||||
|
// useProtobuf: true,
|
||||||
|
// ssl: {
|
||||||
|
// type: 'wss',
|
||||||
|
// key: fs.readFileSync('/usr/local/nginx/conf/cert/*.37wan.com.key'),
|
||||||
|
// cert: fs.readFileSync('/usr/local/nginx/conf/cert/*.37wan.com_with_chain.crt'),
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// });
|
||||||
|
|
||||||
app.configure(ALL_ENVS, 'gate', function () {
|
app.configure(ALL_ENVS, 'gate', function () {
|
||||||
app.set('connectorConfig',
|
app.set('connectorConfig',
|
||||||
{
|
{
|
||||||
@@ -236,7 +253,7 @@ if (app.isMaster()) {
|
|||||||
|
|
||||||
|
|
||||||
app.event.on('add_servers', (server) => {
|
app.event.on('add_servers', (server) => {
|
||||||
if(server.isGM != 'true') {
|
if(server.id != 'connector-server-gm') {
|
||||||
redisService.setConnectors(server);
|
redisService.setConnectors(server);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -476,7 +476,7 @@ export async function checkConnectors() {
|
|||||||
let redisServers = await redisClient().hgetallAsync(REDIS_KEY.SYS_SERVER);
|
let redisServers = await redisClient().hgetallAsync(REDIS_KEY.SYS_SERVER);
|
||||||
for(let id in redisServers) {
|
for(let id in redisServers) {
|
||||||
let server = servers.find(cur => cur.id == id);
|
let server = servers.find(cur => cur.id == id);
|
||||||
if(!server || server['isGM'] == 'true') {
|
if(!server || server.id == 'connector-server-gm') {
|
||||||
await redisClient().hdelAsync(REDIS_KEY.SYS_SERVER, id);
|
await redisClient().hdelAsync(REDIS_KEY.SYS_SERVER, id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -247,9 +247,9 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
'sq1': {
|
'sq1': {
|
||||||
'connector': [
|
'connector': [
|
||||||
{ 'id': 'connector-server-1', 'port': 4050, 'clientHost': '8.142.77.11', 'host': '172.16.4.108', 'clientPort': 3050, 'frontend': true },
|
{ 'id': 'connector-server-1', 'port': 4050, 'clientHost': 'sq1-game1-sgzyz.37wan.com', 'host': '172.16.4.108', 'clientPort': 3050, 'frontend': true },
|
||||||
{ 'id': 'connector-server-2', 'port': 4051, 'clientHost': '8.142.77.11', 'host': '172.16.4.108', 'clientPort': 3051, 'frontend': true },
|
{ 'id': 'connector-server-2', 'port': 4051, 'clientHost': 'sq1-game1-sgzyz.37wan.com', 'host': '172.16.4.108', 'clientPort': 3051, 'frontend': true },
|
||||||
{ 'id': 'connector-server-3', 'port': 4052, 'clientHost': '8.142.77.11', 'host': '172.16.4.108', 'clientPort': 3052, 'frontend': true },
|
{ 'id': 'connector-server-3', 'port': 4052, 'clientHost': 'sq1-game1-sgzyz.37wan.com', 'host': '172.16.4.108', 'clientPort': 3052, 'frontend': true },
|
||||||
],
|
],
|
||||||
'chat': [
|
'chat': [
|
||||||
{ 'id': 'chat-server-1', 'host': '172.16.4.108', 'port': 6050 },
|
{ 'id': 'chat-server-1', 'host': '172.16.4.108', 'port': 6050 },
|
||||||
@@ -263,8 +263,8 @@ module.exports = {
|
|||||||
{ 'id': 'battle-server-1', 'host': '172.16.4.108', 'port': 6054 }
|
{ 'id': 'battle-server-1', 'host': '172.16.4.108', 'port': 6054 }
|
||||||
],
|
],
|
||||||
'gate': [
|
'gate': [
|
||||||
{ 'id': 'gate-server-1', 'host': '172.16.4.108', 'clientHost': '8.142.77.11', 'clientPort': 3014, 'frontend': true },
|
{ 'id': 'gate-server-1', 'host': '172.16.4.108', 'clientHost': 'sq1-game1-sgzyz.37wan.com', 'clientPort': 3014, 'frontend': true },
|
||||||
{ 'id': 'gate-server-2', 'host': '172.16.4.108', 'clientHost': '8.142.77.11', 'clientPort': 3015, 'frontend': true }
|
{ 'id': 'gate-server-2', 'host': '172.16.4.108', 'clientHost': 'sq1-game1-sgzyz.37wan.com', 'clientPort': 3015, 'frontend': true }
|
||||||
],
|
],
|
||||||
'gm': [
|
'gm': [
|
||||||
{ 'id': 'gm-server-1', 'host': '172.16.4.108', 'port': 6055 }
|
{ 'id': 'gm-server-1', 'host': '172.16.4.108', 'port': 6055 }
|
||||||
@@ -285,7 +285,7 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
'sq2': {
|
'sq2': {
|
||||||
'connector': [
|
'connector': [
|
||||||
{ 'id': 'connector-server-gm', 'port': 4099, 'clientHost': '39.103.207.209', 'host': '172.16.4.108', 'clientPort': 3099, 'frontend': true, 'isGM': true }
|
{ 'id': 'connector-server-gm', 'port': 4099, 'clientHost': 'gm-sgzyz.37wan.com', 'host': '172.16.4.108', 'clientPort': 3099, 'frontend': true, 'isGM': 'true' }
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
164
game-server/config/sq1/log4js.ts
Normal file
164
game-server/config/sq1/log4js.ts
Normal file
@@ -0,0 +1,164 @@
|
|||||||
|
module.exports = {
|
||||||
|
'appenders': {
|
||||||
|
'console': {
|
||||||
|
'type': 'console'
|
||||||
|
},
|
||||||
|
'con-log': {
|
||||||
|
'type': 'file',
|
||||||
|
'filename': '${opts:base}/logs/con-log-${opts:serverId}.log',
|
||||||
|
'pattern': 'connector',
|
||||||
|
'maxLogSize': 1048576,
|
||||||
|
'layout': {
|
||||||
|
'type': 'basic'
|
||||||
|
},
|
||||||
|
'backups': 5
|
||||||
|
},
|
||||||
|
'rpc-log': {
|
||||||
|
'type': 'file',
|
||||||
|
'filename': '${opts:base}/logs/rpc-log-${opts:serverId}.log',
|
||||||
|
'maxLogSize': 1048576,
|
||||||
|
'layout': {
|
||||||
|
'type': 'basic'
|
||||||
|
},
|
||||||
|
'backups': 5
|
||||||
|
},
|
||||||
|
'forward-log': {
|
||||||
|
'type': 'file',
|
||||||
|
'filename': '${opts:base}/logs/forward-log-${opts:serverId}.log',
|
||||||
|
'maxLogSize': 1048576,
|
||||||
|
'layout': {
|
||||||
|
'type': 'basic'
|
||||||
|
},
|
||||||
|
'backups': 5
|
||||||
|
},
|
||||||
|
'rpc-debug': {
|
||||||
|
'type': 'file',
|
||||||
|
'filename': '${opts:base}/logs/rpc-debug-${opts:serverId}.log',
|
||||||
|
'maxLogSize': 1048576,
|
||||||
|
'layout': {
|
||||||
|
'type': 'basic'
|
||||||
|
},
|
||||||
|
'backups': 5
|
||||||
|
},
|
||||||
|
'crash-log': {
|
||||||
|
'type': 'file',
|
||||||
|
'filename': '${opts:base}/logs/crash.log',
|
||||||
|
'maxLogSize': 1048576,
|
||||||
|
'layout': {
|
||||||
|
'type': 'basic'
|
||||||
|
},
|
||||||
|
'backups': 5
|
||||||
|
},
|
||||||
|
'admin-log': {
|
||||||
|
'type': 'file',
|
||||||
|
'filename': '${opts:base}/logs/admin.log',
|
||||||
|
'maxLogSize': 1048576,
|
||||||
|
'layout': {
|
||||||
|
'type': 'basic'
|
||||||
|
},
|
||||||
|
'backups': 5
|
||||||
|
},
|
||||||
|
'pinus': {
|
||||||
|
'type': 'file',
|
||||||
|
'filename': '${opts:base}/logs/pinus-${opts:serverId}.log',
|
||||||
|
'maxLogSize': 1048576,
|
||||||
|
'layout': {
|
||||||
|
'type': 'basic'
|
||||||
|
},
|
||||||
|
'backups': 5
|
||||||
|
},
|
||||||
|
'pinus-admin': {
|
||||||
|
'type': 'file',
|
||||||
|
'filename': '${opts:base}/logs/pinus-admin.log',
|
||||||
|
'maxLogSize': 1048576,
|
||||||
|
'layout': {
|
||||||
|
'type': 'basic'
|
||||||
|
},
|
||||||
|
'backups': 5
|
||||||
|
},
|
||||||
|
'pinus-rpc': {
|
||||||
|
'type': 'file',
|
||||||
|
'filename': '${opts:base}/logs/pinus-rpc-${opts:serverId}.log',
|
||||||
|
'maxLogSize': 1048576,
|
||||||
|
'layout': {
|
||||||
|
'type': 'basic'
|
||||||
|
},
|
||||||
|
'backups': 5
|
||||||
|
},
|
||||||
|
'app': {
|
||||||
|
'type': 'file',
|
||||||
|
'filename': '${opts:base}/../logs/app/app.log',
|
||||||
|
'maxLogSize': 1048576,
|
||||||
|
'layout': {
|
||||||
|
'type': 'basic'
|
||||||
|
},
|
||||||
|
'backups': 5
|
||||||
|
},
|
||||||
|
'error': {
|
||||||
|
'type': 'file',
|
||||||
|
'filename': '${opts:base}/../logs/app/error.log',
|
||||||
|
'maxLogSize': 1048576,
|
||||||
|
'layout': {
|
||||||
|
'type': 'basic'
|
||||||
|
},
|
||||||
|
'backups': 5
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
'categories': {
|
||||||
|
'default': {
|
||||||
|
'appenders': ['console'],
|
||||||
|
'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': ['console'],
|
||||||
|
'level': 'debug'
|
||||||
|
},
|
||||||
|
'info': {
|
||||||
|
'appenders': ['console', 'app'],
|
||||||
|
'level': 'debug'
|
||||||
|
},
|
||||||
|
'err': {
|
||||||
|
'appenders': ['console', 'error'],
|
||||||
|
'level': 'debug'
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
'prefix': '${opts:serverId} ',
|
||||||
|
'replaceConsole': true,
|
||||||
|
'lineDebug': false,
|
||||||
|
'errorStack': true
|
||||||
|
};
|
||||||
@@ -81,7 +81,7 @@ export default (appInfo: EggAppInfo) => {
|
|||||||
{ env: 'alpha', name: "测试服", domain: 'http://pinus_gm_test.trgame.cn' },
|
{ env: 'alpha', name: "测试服", domain: 'http://pinus_gm_test.trgame.cn' },
|
||||||
{ env: 'dev', name: "开发服", domain: 'http://zyzdev_gm.trgame.cn' },
|
{ env: 'dev', name: "开发服", domain: 'http://zyzdev_gm.trgame.cn' },
|
||||||
// 37测试服组
|
// 37测试服组
|
||||||
{ env: 'sq1', name: "37测试1服", domain: 'http://39.103.207.209:7500' },
|
{ env: 'sq1', name: "37测试1服", domain: 'http://gm-sgzyz.37wan.com' },
|
||||||
];
|
];
|
||||||
config.regions = regions;
|
config.regions = regions;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user