This commit is contained in:
lightings 2023-04-06 21:20:13 +08:00
parent 0ea959f7ca
commit 82e525425c
7 changed files with 46 additions and 25 deletions

3
.dockerignore Normal file
View File

@ -0,0 +1,3 @@
DemoUnity/
web-server/
node_modules

View File

@ -124,7 +124,7 @@ public class LoginGUI : MonoBehaviour {
public void Login()
{
string host = "192.168.100.173";
string host = "127.0.0.1";
int port = 3999;
// if (pc != null)
// {

View File

@ -68,8 +68,8 @@ MonoBehaviour:
y: 0
width: 340
height: 751
m_MinSize: {x: 276, y: 71}
m_MaxSize: {x: 4001, y: 4021}
m_MinSize: {x: 275, y: 50}
m_MaxSize: {x: 4000, y: 4000}
m_ActualView: {fileID: 13}
m_Panes:
- {fileID: 13}
@ -94,8 +94,8 @@ MonoBehaviour:
y: 0
width: 272
height: 445.5
m_MinSize: {x: 201, y: 221}
m_MaxSize: {x: 4001, y: 4021}
m_MinSize: {x: 200, y: 200}
m_MaxSize: {x: 4000, y: 4000}
m_ActualView: {fileID: 14}
m_Panes:
- {fileID: 14}
@ -120,8 +120,8 @@ MonoBehaviour:
y: 445.5
width: 1100
height: 305.5
m_MinSize: {x: 101, y: 121}
m_MaxSize: {x: 4001, y: 4021}
m_MinSize: {x: 100, y: 100}
m_MaxSize: {x: 4000, y: 4000}
m_ActualView: {fileID: 17}
m_Panes:
- {fileID: 12}
@ -268,8 +268,8 @@ MonoBehaviour:
y: 0
width: 828
height: 445.5
m_MinSize: {x: 202, y: 221}
m_MaxSize: {x: 4002, y: 4021}
m_MinSize: {x: 200, y: 200}
m_MaxSize: {x: 4000, y: 4000}
m_ActualView: {fileID: 16}
m_Panes:
- {fileID: 15}
@ -292,7 +292,7 @@ MonoBehaviour:
m_MaxSize: {x: 10000, y: 10000}
m_TitleContent:
m_Text: Project
m_Image: {fileID: -5467254957812901981, guid: 0000000000000000d000000000000000,
m_Image: {fileID: -5179483145760003458, guid: 0000000000000000d000000000000000,
type: 0}
m_Tooltip:
m_Pos:
@ -333,7 +333,7 @@ MonoBehaviour:
scrollPos: {x: 0, y: 7}
m_SelectedIDs: 38710000
m_LastClickedID: 28984
m_ExpandedIDs: 0000000006710000ffffff7f
m_ExpandedIDs: 0000000006710000
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name:
@ -475,7 +475,7 @@ MonoBehaviour:
m_MaxSize: {x: 4000, y: 4000}
m_TitleContent:
m_Text: Hierarchy
m_Image: {fileID: 7966133145522015247, guid: 0000000000000000d000000000000000,
m_Image: {fileID: -3734745235275155857, guid: 0000000000000000d000000000000000,
type: 0}
m_Tooltip:
m_Pos:
@ -491,9 +491,9 @@ MonoBehaviour:
m_SceneHierarchy:
m_TreeViewState:
scrollPos: {x: 0, y: 0}
m_SelectedIDs:
m_LastClickedID: 0
m_ExpandedIDs: 10fbfffff4ffffff
m_SelectedIDs: 6a6e0000
m_LastClickedID: 28266
m_ExpandedIDs: 0efbffff
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name:
@ -533,7 +533,7 @@ MonoBehaviour:
m_MaxSize: {x: 4000, y: 4000}
m_TitleContent:
m_Text: Scene
m_Image: {fileID: 2593428753322112591, guid: 0000000000000000d000000000000000,
m_Image: {fileID: 8634526014445323508, guid: 0000000000000000d000000000000000,
type: 0}
m_Tooltip:
m_Pos:
@ -872,7 +872,7 @@ MonoBehaviour:
m_MaxSize: {x: 4000, y: 4000}
m_TitleContent:
m_Text: Game
m_Image: {fileID: -6423792434712278376, guid: 0000000000000000d000000000000000,
m_Image: {fileID: 4621777727084837110, guid: 0000000000000000d000000000000000,
type: 0}
m_Tooltip:
m_Pos:
@ -965,7 +965,7 @@ MonoBehaviour:
m_MaxSize: {x: 4000, y: 4000}
m_TitleContent:
m_Text: Console
m_Image: {fileID: -4327648978806127646, guid: 0000000000000000d000000000000000,
m_Image: {fileID: -4950941429401207979, guid: 0000000000000000d000000000000000,
type: 0}
m_Tooltip:
m_Pos:

View File

@ -7,6 +7,7 @@ RUN apt-get update && apt-get install -y sysstat curl
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
RUN apt-get install -y nodejs
RUN mkdir -p /works/jc/r2
COPY . /works/jc/r2
RUN npm install
COPY game-server /works/jc/r2/game-server
COPY shared /works/jc/r2/shared
# RUN npm install
CMD npm run start

View File

@ -13,16 +13,19 @@ spec:
spec:
containers:
- name: r2server
image: localhost:5550/r2server:v1
image: lsmbp.local:5550/r2server:v5
imagePullPolicy: IfNotPresent
resources:
limits:
memory: "256Mi"
cpu: "500m"
memory: "1024Mi"
cpu: "1000m"
ports:
- containerPort: 3999
hostPort: 3999
- containerPort: 3010
hostPort: 3010
- containerPort: 3011
hostPort: 3011
---
apiVersion: v1
kind: Service
@ -34,6 +37,7 @@ spec:
ports:
- port: 3999
targetPort: 3999
protocol: TCP
---
apiVersion: v1
kind: Service
@ -45,6 +49,7 @@ spec:
ports:
- port: 3010
targetPort: 3010
protocol: TCP
---
apiVersion: v1
kind: Service
@ -56,4 +61,13 @@ spec:
ports:
- port: 3011
targetPort: 3011
protocol: TCP
---
apiVersion: v1
kind: ConfigMap
metadata:
name: r2server-service-gate-config
namespace: default
data:
3999: "r2server-service-gate:3999"

View File

@ -21,7 +21,9 @@ Handler.prototype.entry = function(msg, session, next) {
const uid = msg.uid;
const sessionService = this.app.get('sessionService');
const serverId = this.app.serverId;
console.log(`-------entry ${session.id} : ${uid}`);
// 重复登录检查
// if( !! sessionService.getByUid(uid)) {
// console.log(`-------kick ${session.id} : ${uid}`)
@ -43,6 +45,7 @@ Handler.prototype.entry = function(msg, session, next) {
session.on('closed', onUserLeave.bind(null, this.app));
session.pushAll((err)=> {
if (err) {
logger.error('error: %j', err.stack);
next(null, { code: 500, error: true });
return;

View File

@ -1,8 +1,8 @@
{
"development":{
"connector": [
{"id": "connector-server-0", "host": "127.0.0.1", "port": 3150, "clientHost": "0.0.0.0", "clientPort": 3010, "frontend": true},
{"id": "connector-server-1", "host": "127.0.0.1", "port": 3151, "clientHost": "0.0.0.0", "clientPort": 3011, "frontend": true}
{"id": "connector-server-0", "host": "127.0.0.1", "port": 3150, "clientHost": "0.0.0.0", "proxyHost": "localhost", "clientPort": 3010, "frontend": true},
{"id": "connector-server-1", "host": "127.0.0.1", "port": 3151, "clientHost": "0.0.0.0", "proxyHost": "localhost", "clientPort": 3011, "frontend": true}
],
"guild": [
{"id": "guild-server-0", "host": "127.0.0.1", "port": 3200},