From f298d27089c46cfbddcc85bf521d2d65c37fd119 Mon Sep 17 00:00:00 2001 From: SysProChan Date: Sat, 17 Aug 2024 17:19:25 +0800 Subject: [PATCH] test1 --- .gitea/workflows/pms.yaml | 2 +- cicd/Dockerfile | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/pms.yaml b/.gitea/workflows/pms.yaml index 87c8aec1..060f190e 100644 --- a/.gitea/workflows/pms.yaml +++ b/.gitea/workflows/pms.yaml @@ -13,7 +13,7 @@ jobs: build-and-deploy: runs-on: runner env: - HOST_PORT: 7080 + HOST_PORT: 8080 CTN_NAME: "ctn-pms" IMG_NAME: "${{ github.repository }}:${{ github.ref_name }}" REMOTE_IMG_NAME: "${{ vars.ALI_REGISTRY }}/${{ github.repository }}:${{ github.ref_name }}" diff --git a/cicd/Dockerfile b/cicd/Dockerfile index 948d9014..bdefb9e2 100644 --- a/cicd/Dockerfile +++ b/cicd/Dockerfile @@ -1,11 +1,11 @@ ARG registry=registry.cn-hangzhou.aliyuncs.com/syschan FROM ${registry}/golang:alpine as builder WORKDIR /app -COPY ./server . -RUN go generate && source ./bin/start/.env && go build -o ./bin/$appName -v . +COPY . . +RUN cd server && go generate && source ./cicd/bin/start/.env && go build -o ./cicd/bin/$appName -v . FROM ${registry}/alpine:latest WORKDIR /app -COPY --from=builder /app/bin/ . +COPY --from=builder /app/cicd/bin/ . RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories && apk add bash && chmod +x ./start/script.sh CMD ["bash","-c","./start/script.sh"]