feat(打包): 项目信息的修改以及打包脚本的编写

This commit is contained in:
lqyan 2024-11-05 14:30:24 +08:00
parent 947718c5f6
commit 0fde21c0ec
6 changed files with 13 additions and 6 deletions

2
.gitignore vendored
View File

@ -1,2 +1,2 @@
yuchat-proxy-server yuchat-proxy-server
yuchat-proxy-client.exe *.exe

View File

@ -1,8 +1,13 @@
from docker.yuchat.top/golang:1.21-alpine AS builder
workdir /app
COPY . .
RUN go mod tidy && go build -o yuchat-proxy-server server/main.go
from docker.yuchat.top/alpine:3.11 from docker.yuchat.top/alpine:3.11
workdir /app workdir /app
expose 8080 expose 8080
add yuchat-proxy-server /app copy --from=builder /app/yuchat-proxy-server /app/yuchat-proxy-server
entrypoint ["./yuchat-proxy-server"] entrypoint ["./yuchat-proxy-server"]

2
build-client.bat Normal file
View File

@ -0,0 +1,2 @@
go mod tidy
go build -o yuchat-proxy-client.exe client/main.go

View File

@ -3,7 +3,7 @@ package main
import ( import (
"log" "log"
"net" "net"
"test-proxy-go/common" "yuchat-proxy/common"
"github.com/gorilla/websocket" "github.com/gorilla/websocket"
) )

4
go.mod
View File

@ -1,5 +1,5 @@
module test-proxy-go module yuchat-proxy
go 1.21.0 go 1.21.0
require github.com/gorilla/websocket v1.5.3 // indirect require github.com/gorilla/websocket v1.5.3

View File

@ -6,7 +6,7 @@ import (
"log" "log"
"net" "net"
"net/http" "net/http"
"test-proxy-go/common" "yuchat-proxy/common"
"github.com/gorilla/websocket" "github.com/gorilla/websocket"
) )