Apply .gitignore rules

This commit is contained in:
皮蛋13361098506
2025-01-06 16:21:36 +08:00
parent 1b77f62820
commit ccd2c530cf
580 changed files with 69806 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
package managecenterModel
// 服务器状态
type GroupState int32
const (
// 正常
Con_GroupState_Normal GroupState = 1
// 维护
Con_GroupState_Maintain GroupState = 2
)

View File

@@ -0,0 +1,40 @@
# 使用官方的 Go 镜像作为构建环境
FROM golang:1.22.10-alpine AS builder
# 设置工作目录
WORKDIR /app
# 设置 Go 代理
ENV GOPROXY=https://goproxy.cn,direct
# 禁用 CGO
ENV CGO_ENABLED=0
# 复制所有源代码文件
COPY . .
WORKDIR /app/admincenter
# 构建应用程序,并确认生成的文件
RUN go build -o adminserver -ldflags="-s -w"
# 使用官方的 Alpine 镜像作为运行环境
FROM alpine:latest
# 设置作者标签
LABEL authors="tp"
# 设置工作目录
WORKDIR /app
# 从构建阶段复制编译好的可执行文件
COPY --from=builder /app/admincenter/adminserver .
# 复制配置文件
COPY --from=builder /app/admincenter/config.yaml .
# 暴露端口(假设 adminserver 监听 10051 端口)
EXPOSE 10051
# 设置容器启动时运行 adminserver
ENTRYPOINT ["./adminserver"]