This commit is contained in:
SysProChan 2024-08-17 17:19:25 +08:00
parent 07c0501968
commit f298d27089
2 changed files with 4 additions and 4 deletions

View File

@ -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 }}"

View File

@ -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"]