feat 移动服务器发布工具

This commit is contained in:
2025-12-13 18:41:57 +08:00
parent bc656247c9
commit 6e19d93f5e
10 changed files with 22 additions and 90 deletions

2
.gitignore vendored
View File

@@ -1,5 +1,7 @@
.idea .idea
*/.idea */.idea
Public/Publish/Server/gateway
Public/Publish/Server/scene
# Unity生成的目录 # Unity生成的目录
Client/unity_clone_0/ Client/unity_clone_0/

View File

@@ -1,6 +1,6 @@
@echo off @echo off
setlocal setlocal
cd "%~dp0" cd ../../../Server/
set GOOS=linux set GOOS=linux
set GOARCH=amd64 set GOARCH=amd64

View File

@@ -0,0 +1,19 @@
@echo off
call ./build-all.bat
echo.
rd /s /q gateway
xcopy ..\..\..\Server\gateway\config\config.prod.yaml gateway\config\ >nul
xcopy ..\..\..\Server\gateway\Dockerfile gateway\ >nul
move ..\..\..\Server\server-gateway gateway\ >nul
echo [INFO] Copy gateway finished.
rd /s /q scene
xcopy ..\..\..\Server\scene\config\config.prod.yaml scene\config\ >nul
xcopy ..\..\..\Server\scene\Dockerfile scene\ >nul
move ..\..\..\Server\server-scene scene\ >nul
echo [INFO] Copy scene finished.
echo.
pause

View File

@@ -1,11 +0,0 @@
FROM alpine:latest
RUN apk add --no-cache tzdata && \
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
echo "Asia/Shanghai" > /etc/timezone
COPY gateway/ /app/
RUN chmod 777 /app/server-gateway
WORKDIR /app
CMD ["./server-gateway"]

View File

@@ -1,29 +0,0 @@
app:
name: "gateway-prod"
log:
debug: false
level: "debug"
maxSize: 10
maxBackups: 100
maxAge: 7
db:
etcd:
address: [ "172.18.28.0:2379" ]
serve:
grpc:
address: "172.18.28.0"
port: 8500
ttl: 20
socket:
web:
address: "172.18.28.0"
port: 8501
raw:
address: "172.18.28.0"
port: 8502
http:
address: "172.18.28.0"
port: 8503

View File

@@ -1,19 +0,0 @@
@echo off
call ../build-all.bat
echo.
rd /s /q gateway
xcopy ..\gateway\config\config.prod.yaml gateway\config\ >nul
xcopy ..\gateway\Dockerfile gateway\ >nul
move ..\server-gateway gateway\ >nul
echo [INFO] Copy gateway finished.
rd /s /q scene
xcopy ..\scene\config\config.prod.yaml scene\config\ >nul
xcopy ..\scene\Dockerfile scene\ >nul
move ..\server-scene scene\ >nul
echo [INFO] Copy scene finished.
echo.
pause

View File

@@ -1,11 +0,0 @@
FROM alpine:latest
RUN apk add --no-cache tzdata && \
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
echo "Asia/Shanghai" > /etc/timezone
COPY scene/ /app/
RUN chmod 777 /app/server-scene
WORKDIR /app
CMD ["./server-scene"]

View File

@@ -1,19 +0,0 @@
app:
name: "scene-prod"
log:
debug: false
level: "debug"
maxSize: 10
maxBackups: 100
maxAge: 7
db:
etcd:
address: [ "172.18.28.0:2379" ]
serve:
grpc:
address: "172.18.28.0"
port: 8504
ttl: 20