Compare commits
2 Commits
59cb042f82
...
f7063eb581
Author | SHA1 | Date |
---|---|---|
|
f7063eb581 | |
|
f298d27089 |
|
@ -13,7 +13,7 @@ jobs:
|
||||||
build-and-deploy:
|
build-and-deploy:
|
||||||
runs-on: runner
|
runs-on: runner
|
||||||
env:
|
env:
|
||||||
HOST_PORT: 7080
|
HOST_PORT: 8080
|
||||||
CTN_NAME: "ctn-pms"
|
CTN_NAME: "ctn-pms"
|
||||||
IMG_NAME: "${{ github.repository }}:${{ github.ref_name }}"
|
IMG_NAME: "${{ github.repository }}:${{ github.ref_name }}"
|
||||||
REMOTE_IMG_NAME: "${{ vars.ALI_REGISTRY }}/${{ 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
|
ARG registry=registry.cn-hangzhou.aliyuncs.com/syschan
|
||||||
FROM ${registry}/golang:alpine as builder
|
FROM ${registry}/golang:alpine as builder
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY ./server/ .
|
COPY . .
|
||||||
RUN go generate && source ./bin/start/.env && go build -o ./bin/$appName -v .
|
RUN cd server && go generate && source ./cicd/bin/start/.env && go build -o ./cicd/bin/$appName -v .
|
||||||
|
|
||||||
FROM ${registry}/alpine:latest
|
FROM ${registry}/alpine:latest
|
||||||
WORKDIR /app
|
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
|
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"]
|
CMD ["bash","-c","./start/script.sh"]
|
||||||
|
|
Loading…
Reference in New Issue