From d151a87c5dac02caa65ab9d38b6e25c89e01a3fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=BF=E9=98=B3?= <997485446@qq.com> Date: Sat, 22 Feb 2025 09:05:44 +0000 Subject: [PATCH 1/5] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20DockerfileSlim?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DockerfileSlim | 34 +++++++++++++++------------------- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/DockerfileSlim b/DockerfileSlim index 94cb7e3..de05259 100644 --- a/DockerfileSlim +++ b/DockerfileSlim @@ -1,22 +1,18 @@ -FROM testhub.szjixun.cn:9043/public/golang:1.20-alpine AS builder +FROM busybox:glibc -LABEL stage=gobuilder -ENV CGO_ENABLED 0 -ENV GOPROXY https://goproxy.cn,direct -WORKDIR /build -COPY micro-bundle /app/micro-bundle +COPY ./docs/Shanghai /usr/share/zoneinfo/Asia/Shanghai +COPY ./docs/certs /etc/ssl/certs +RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone -#FROM 172.16.100.99:9006/alpine -#RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories -#RUN apk update --no-cache -#RUN apk add --no-cache ca-certificates -#RUN apk add --no-cache tzdata -FROM testhub.szjixun.cn:9043/public/self-alpine -COPY ./conf /app/conf +#ENV TZ Asia/Shanghai +ARG GIT_COMMIT=default_value +ENV GIT_COMMIT=$GIT_COMMIT -ENV TZ Asia/Shanghai -ENV MODE_ENV k8stest -WORKDIR /app -COPY --from=builder /app/micro-bundle . -EXPOSE 20118 -CMD ["/app/micro-bundle"] +WORKDIR /app/main-client +#通过名称引用 +COPY ./build/app ./bin/mainServer +COPY ./conf/ /app/conf/ +COPY ./conf/ ./conf/ + +WORKDIR /app/main-client/bin +CMD ["./mainServer"] \ No newline at end of file From a7e7b034a9ca4aec9a9e7f7c38df409b9340c6d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=BF=E9=98=B3?= <997485446@qq.com> Date: Sat, 22 Feb 2025 09:08:24 +0000 Subject: [PATCH 2/5] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20DockerfileSlim?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DockerfileSlim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DockerfileSlim b/DockerfileSlim index de05259..7978cf3 100644 --- a/DockerfileSlim +++ b/DockerfileSlim @@ -1,7 +1,7 @@ FROM busybox:glibc -COPY ./docs/Shanghai /usr/share/zoneinfo/Asia/Shanghai -COPY ./docs/certs /etc/ssl/certs +COPY ./conf/Shanghai /usr/share/zoneinfo/Asia/Shanghai +COPY ./conf/certs /etc/ssl/certs RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone #ENV TZ Asia/Shanghai From c7fe42e464d262444ff550d621678f7144df1c5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=BF=E9=98=B3?= <997485446@qq.com> Date: Sat, 22 Feb 2025 09:21:33 +0000 Subject: [PATCH 3/5] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20DockerfileSlim?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DockerfileSlim | 1 + 1 file changed, 1 insertion(+) diff --git a/DockerfileSlim b/DockerfileSlim index 7978cf3..add01a4 100644 --- a/DockerfileSlim +++ b/DockerfileSlim @@ -13,6 +13,7 @@ WORKDIR /app/main-client COPY ./build/app ./bin/mainServer COPY ./conf/ /app/conf/ COPY ./conf/ ./conf/ +ENV MODE_ENV prod WORKDIR /app/main-client/bin CMD ["./mainServer"] \ No newline at end of file From 70ef92b494d4525ed35d71b14f7cfd6c56997e67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=BF=E9=98=B3?= <997485446@qq.com> Date: Sat, 22 Feb 2025 09:28:54 +0000 Subject: [PATCH 4/5] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20DockerfileSlim?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DockerfileSlim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DockerfileSlim b/DockerfileSlim index add01a4..cf37e95 100644 --- a/DockerfileSlim +++ b/DockerfileSlim @@ -12,7 +12,7 @@ WORKDIR /app/main-client #通过名称引用 COPY ./build/app ./bin/mainServer COPY ./conf/ /app/conf/ -COPY ./conf/ ./conf/ +COPY ./conf/ /app/main-client/bin/conf/ ENV MODE_ENV prod WORKDIR /app/main-client/bin From 7879ea17cbe9ede4c014a2b8c8c6057dde9ff42f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=BF=E9=98=B3?= <997485446@qq.com> Date: Mon, 24 Feb 2025 12:28:10 +0000 Subject: [PATCH 5/5] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20conf/prod/config.yaml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- conf/prod/config.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/conf/prod/config.yaml b/conf/prod/config.yaml index 039e338..1d0d4d3 100644 --- a/conf/prod/config.yaml +++ b/conf/prod/config.yaml @@ -2,10 +2,10 @@ system: mode: prod #正式 prod #测试 test #开发 dev # config_source: configmap bundleDB: - host: 172.16.100.99 - port: 9007 - user: artuser - password: C250PflXIWv2SQm8 + host: svc-fontree-mysql-service + port: 3306 + user: fonchain_opv + password: IhQmhg8HZjDmU=Ove5PnA^D db_name: "fontree_bundle" #redis: # db: ${oa-meeting.redis.db}