diff --git a/Dockerfile b/Dockerfile index 0d920bb..47cd6a5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/manifest/config/config.yaml b/manifest/config/config.yaml index 76516da..16933d8 100644 --- a/manifest/config/config.yaml +++ b/manifest/config/config.yaml @@ -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 \ No newline at end of file + addr: 192.168.0.83:4318 \ No newline at end of file