From fd147a56e8b27e14a56b1fc0b555c1aaa228bd69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=96=8C?= <259278618@qq.com> Date: Wed, 1 Apr 2026 13:49:15 +0800 Subject: [PATCH] Dockerfile --- Dockerfile | 11 +++++++---- go.mod | 4 ++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7144784..417e52a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,14 +13,17 @@ ENV GOTOOLCHAIN=auto ENV GOPRIVATE=gitea.com/red-future/common # 配置git使用私有Gitea仓库 -RUN git config --global url."http://x-token-auth:9b31146aa8c10a7cb4f2e49dcee0934a223be1076289810e1ad98b968066c2bc@116.204.74.41:3000/red-future/common.git".insteadOf "https://gitea.com/red-future/common.git" && \ +RUN git config --global url."http://116.204.74.41:3000/red-future/common.git".insteadOf "https://gitea.com/red-future/common.git" && \ git config --global credential.helper store +# 设置GIT凭据 +RUN echo "http://x-token-auth:9b31146aa8c10a7cb4f2e49dcee0934a223be1076289810e1ad98b968066c2bc@116.204.74.41:3000" > ~/.git-credentials + WORKDIR /build -# 复制父目录的 common 模块(因为 go.mod 中使用了本地 replace) -COPY ../common /build/common -COPY . . +COPY go.mod go.sum ./ +COPY main.go ./ +COPY config.yml ./ RUN go mod download && go mod tidy diff --git a/go.mod b/go.mod index efab45e..10e4b91 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module assets go 1.25.8 require ( - gitea.com/red-future/common v0.0.6 + gitea.com/red-future/common v0.0.7 github.com/bjang03/gmq v0.0.0-20251219093200-000000000000 github.com/gogf/gf/contrib/drivers/pgsql/v2 v2.10.0 github.com/gogf/gf/v2 v2.10.0 @@ -12,7 +12,7 @@ require ( go.mongodb.org/mongo-driver/v2 v2.5.0 ) -replace gitea.com/red-future/common v0.0.6 => ../common +replace gitea.com/red-future/common v0.0.7 => ../common replace github.com/bjang03/gmq => ../gmq