From db694c298c2a3f609200f1ff6ba891880a5cc4d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=96=8C?= <259278618@qq.com> Date: Mon, 22 Jun 2026 09:26:53 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=81=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 25 ------------------------- config.yml | 15 ++++++--------- 2 files changed, 6 insertions(+), 34 deletions(-) diff --git a/Dockerfile b/Dockerfile index ee852cb..e4d8c9d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,12 +10,6 @@ ENV GO111MODULE=on ENV GOPROXY=https://goproxy.cn,direct ENV CGO_ENABLED=0 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" && \ - git config --global credential.helper store - WORKDIR /build COPY . . @@ -24,25 +18,6 @@ RUN go mod download && go mod tidy RUN go build -ldflags="-s -w" -o main ./main.go -# 阶段2: 运行 -FROM alpine:3.19 - -RUN apk add --no-cache ca-certificates tzdata - -ENV TZ=Asia/Shanghai -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone - -WORKDIR /app - -COPY --from=builder /build/main . -COPY --from=builder /build/config.yml ./ - -RUN mkdir -p /app/resource/log/run \ - /app/resource/log/server \ - && adduser -D -u 1000 appuser \ - && chown -R appuser:appuser /app - -USER appuser EXPOSE 3005 diff --git a/config.yml b/config.yml index 6703168..0d0ea0d 100644 --- a/config.yml +++ b/config.yml @@ -5,7 +5,7 @@ server: database: default: - type: "pgsql" - host: "116.204.74.41" + host: "192.168.0.83" port: "15432" user: "postgres" pass: "Bjang09@686^*^" @@ -26,7 +26,7 @@ database: timeMaintainDisabled: false # (可选)是否完全关闭时间更新特性,为true时CreatedAt/UpdatedAt/DeletedAt都将失效 black_deacon: - type: "pgsql" - host: "116.204.74.41" + host: "192.168.0.83" port: "15432" user: "postgres" pass: "Bjang09@686^*^" @@ -48,7 +48,7 @@ database: redis: default: - address: 116.204.74.41:6379 + address: 192.168.0.83:6379 db: 0 idleTimeout: "60s" #连接最大空闲时间,使用时间字符串例如30s/1m/1d maxConnLifetime: "90s" #连接最长存活时间,使用时间字符串例如30s/1m/1d @@ -59,13 +59,10 @@ redis: maxActive: 100 consul: - address: 116.204.74.41:8500 + address: 192.168.0.83:8500 jaeger: - addr: 116.204.74.41:4318 + addr: 192.168.0.83:4318 # 文件上传服务地址,与oss模块minio中的endpoint一致 -filePrefix: "http://116.204.74.41:9000" - -model-asynch: - addr: "127.0.0.1:8001" +filePrefix: "http://192.168.0.83:9000"