Compare commits
2 Commits
59cb042f82
...
f7063eb581
Author | SHA1 | Date |
---|---|---|
|
f7063eb581 | |
|
f298d27089 |
|
@ -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 }}"
|
||||
|
|
|
@ -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"]
|
||||
|
|
Loading…
Reference in New Issue