ci/cd调整

This commit is contained in:
2026-06-10 10:20:53 +08:00
parent a73662d2de
commit 0b5dec6965
2 changed files with 16 additions and 26 deletions

View File

@@ -1,29 +1,19 @@
# 阶段1: 构建
FROM golang:alpine AS builder
RUN apk add --no-cache git ca-certificates tzdata
ENV TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
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
# 最小化Docker镜像
FROM busybox:uclibc
WORKDIR /app
COPY . .
RUN go mod download && go mod tidy
# 复制时区数据
COPY timezone/localtime /etc/localtime
COPY timezone/timezone /etc/timezone
COPY timezone/Shanghai /usr/share/zoneinfo/Asia/Shanghai
# 复制预构建的二进制文件和配置文件
COPY app ./main
COPY manifest/config/config.yaml ./manifest/config/config.yaml
COPY manifest/config/config-dev.yaml ./manifest/config/config-dev.yaml
COPY manifest/config/config-master.yaml ./manifest/config/config-master.yaml
COPY resource ./resource
# 创建日志目录
RUN mkdir -p /logs /app/resource/log/run /app/resource/log/server

View File

@@ -28,7 +28,7 @@ logger:
database:
default:
- type: "pgsql"
host: "116.204.74.41"
host: "192.168.0.83"
port: "15432"
user: "postgres"
pass: "Bjang09@686^*^"
@@ -41,7 +41,7 @@ database:
debug : true
dryRun : false #空跑
- type: "pgsql"
host: "116.204.74.41"
host: "192.168.0.83"
port: "15432"
user: "postgres"
pass: "Bjang09@686^*^"
@@ -69,7 +69,7 @@ gfToken:
redis:
# 单实例配置
default:
address: 116.204.74.41:6379
address: 192.168.0.83:6379
db: 1
idleTimeout: "60s" #连接最大空闲时间使用时间字符串例如30s/1m/1d
maxConnLifetime: "90s" #连接最长存活时间使用时间字符串例如30s/1m/1d
@@ -105,10 +105,10 @@ gfcli:
path: "./internal/app/system"
# 文件上传服务地址与oss模块minio中的endpoint(filePrefix需要加http://)一致
filePrefix: "http://116.204.74.41:9000"
filePrefix: "http://192.168.0.83:9000"
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