Fix and update

This commit is contained in:
baohua
2026-02-09 11:34:35 -08:00
parent e669ee0fe8
commit 63377d0431
136 changed files with 2146 additions and 262 deletions

View File

@@ -14,23 +14,33 @@
### 关键配置示例
#### 1. Dockerfile (多阶段构建)
#### 1. Dockerfile 多阶段构建
使用 Docker 多阶段构建可以有效减小镜像体积
Dockerfile 内容如下
```dockerfile
## Build stage
FROM golang:1.18 AS builder
WORKDIR /app
COPY . .
RUN go build -o main .
## Final stage
FROM alpine:latest
WORKDIR /app
COPY --from=builder /app/main .
CMD ["./main"]
```
#### 2. GitLab CI (.gitlab-ci.yml)
#### 2. GitLab CI 配置
GitLab CI.gitlab-ci.yml配置如下
```yaml
stages: