ci/cd调整
This commit is contained in:
30
Dockerfile
30
Dockerfile
@@ -1,29 +1,19 @@
|
|||||||
# 阶段1: 构建
|
# 最小化Docker镜像
|
||||||
FROM golang:alpine AS builder
|
FROM busybox:uclibc
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY . .
|
# 复制时区数据
|
||||||
|
COPY timezone/localtime /etc/localtime
|
||||||
RUN go mod download && go mod tidy
|
COPY timezone/timezone /etc/timezone
|
||||||
|
COPY timezone/Shanghai /usr/share/zoneinfo/Asia/Shanghai
|
||||||
|
|
||||||
# 复制预构建的二进制文件和配置文件
|
# 复制预构建的二进制文件和配置文件
|
||||||
COPY app ./main
|
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
|
RUN mkdir -p /logs /app/resource/log/run /app/resource/log/server
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ logger:
|
|||||||
database:
|
database:
|
||||||
default:
|
default:
|
||||||
- type: "pgsql"
|
- type: "pgsql"
|
||||||
host: "116.204.74.41"
|
host: "192.168.0.83"
|
||||||
port: "15432"
|
port: "15432"
|
||||||
user: "postgres"
|
user: "postgres"
|
||||||
pass: "Bjang09@686^*^"
|
pass: "Bjang09@686^*^"
|
||||||
@@ -41,7 +41,7 @@ database:
|
|||||||
debug : true
|
debug : true
|
||||||
dryRun : false #空跑
|
dryRun : false #空跑
|
||||||
- type: "pgsql"
|
- type: "pgsql"
|
||||||
host: "116.204.74.41"
|
host: "192.168.0.83"
|
||||||
port: "15432"
|
port: "15432"
|
||||||
user: "postgres"
|
user: "postgres"
|
||||||
pass: "Bjang09@686^*^"
|
pass: "Bjang09@686^*^"
|
||||||
@@ -69,7 +69,7 @@ gfToken:
|
|||||||
redis:
|
redis:
|
||||||
# 单实例配置
|
# 单实例配置
|
||||||
default:
|
default:
|
||||||
address: 116.204.74.41:6379
|
address: 192.168.0.83:6379
|
||||||
db: 1
|
db: 1
|
||||||
idleTimeout: "60s" #连接最大空闲时间,使用时间字符串例如30s/1m/1d
|
idleTimeout: "60s" #连接最大空闲时间,使用时间字符串例如30s/1m/1d
|
||||||
maxConnLifetime: "90s" #连接最长存活时间,使用时间字符串例如30s/1m/1d
|
maxConnLifetime: "90s" #连接最长存活时间,使用时间字符串例如30s/1m/1d
|
||||||
@@ -105,10 +105,10 @@ gfcli:
|
|||||||
path: "./internal/app/system"
|
path: "./internal/app/system"
|
||||||
|
|
||||||
# 文件上传服务地址,与oss模块minio中的endpoint(filePrefix需要加http://)一致
|
# 文件上传服务地址,与oss模块minio中的endpoint(filePrefix需要加http://)一致
|
||||||
filePrefix: "http://116.204.74.41:9000"
|
filePrefix: "http://192.168.0.83:9000"
|
||||||
|
|
||||||
consul:
|
consul:
|
||||||
address: 116.204.74.41:8500
|
address: 192.168.0.83:8500
|
||||||
|
|
||||||
jaeger: #链路追踪
|
jaeger: #链路追踪
|
||||||
addr: 116.204.74.41:4318
|
addr: 192.168.0.83:4318
|
||||||
Reference in New Issue
Block a user