fix
This commit is contained in:
parent
d73d748436
commit
41949bef72
|
@ -2,6 +2,10 @@
|
|||
name=${1%%\\*}
|
||||
#进入对应服务目录
|
||||
cd server/$name
|
||||
#把https加密密钥对复制进来
|
||||
cp /opt/env.yaml ./
|
||||
cp /opt/server.fusen.3718.cn.pem ./
|
||||
cp /opt/server.fusen.3718.cn.key ./
|
||||
#构建二进制文件
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o ./bin/api-$name-srv ./$name.go
|
||||
#删除之前旧的镜像
|
||||
|
@ -9,6 +13,10 @@ docker rmi -f api-$name-srv:latest
|
|||
docker rmi -f registry.cn-hangzhou.aliyuncs.com/fusen-test/fusen_docker_hub:latest
|
||||
#打包docker镜像
|
||||
docker build -t api-$name-srv:latest .
|
||||
#删除临时复制进来的文件
|
||||
rm ./env.yaml
|
||||
rm ./server.fusen.3718.cn.pem
|
||||
rm ./server.fusen.3718.cn.key
|
||||
#打tag(测试环境,正式把命名空间fusentest改成fusen)
|
||||
docker tag api-$name-srv:latest registry.cn-hangzhou.aliyuncs.com/fusen-test/$name:latest
|
||||
#推送到阿里云镜像库(测试环境,正式把命名空间fusentest改成fusen)
|
||||
|
|
|
@ -2,5 +2,7 @@ FROM alpine
|
|||
|
||||
WORKDIR /www/fusenapi/
|
||||
COPY ./bin/api-assistant-srv /www/fusenapi/
|
||||
COPY ./etc /www/fusenapi/etc
|
||||
COPY ./env.yaml /opt/
|
||||
COPY ./server.fusen.3718.cn.pem /opt/
|
||||
COPY ./server.fusen.3718.cn.key /opt/
|
||||
CMD ["/www/fusenapi/api-assistant-srv"]
|
||||
|
|
|
@ -2,5 +2,7 @@ FROM alpine
|
|||
|
||||
WORKDIR /www/fusenapi/
|
||||
COPY ./bin/api-canteen-srv /www/fusenapi/
|
||||
COPY ./etc /www/fusenapi/etc
|
||||
COPY ./env.yaml /opt/
|
||||
COPY ./server.fusen.3718.cn.pem /opt/
|
||||
COPY ./server.fusen.3718.cn.key /opt/
|
||||
CMD ["/www/fusenapi/api-canteen-srv"]
|
||||
|
|
|
@ -2,5 +2,7 @@ FROM alpine
|
|||
|
||||
WORKDIR /www/fusenapi/
|
||||
COPY ./bin/api-collection-srv /www/fusenapi/
|
||||
COPY ./etc /www/fusenapi/etc
|
||||
COPY ./env.yaml /opt/
|
||||
COPY ./server.fusen.3718.cn.pem /opt/
|
||||
COPY ./server.fusen.3718.cn.key /opt/
|
||||
CMD ["/www/fusenapi/api-collection-srv"]
|
||||
|
|
|
@ -2,5 +2,7 @@ FROM alpine
|
|||
|
||||
WORKDIR /www/fusenapi/
|
||||
COPY ./bin/api-data-transfer-srv /www/fusenapi/
|
||||
COPY ./etc /www/fusenapi/etc
|
||||
COPY ./env.yaml /opt/
|
||||
COPY ./server.fusen.3718.cn.pem /opt/
|
||||
COPY ./server.fusen.3718.cn.key /opt/
|
||||
CMD ["/www/fusenapi/api-data-transfer-srv"]
|
||||
|
|
|
@ -2,5 +2,7 @@ FROM alpine
|
|||
|
||||
WORKDIR /www/fusenapi/
|
||||
COPY ./bin/api-home-user-auth-srv /www/fusenapi/
|
||||
COPY ./etc /www/fusenapi/etc
|
||||
COPY ./env.yaml /opt/
|
||||
COPY ./server.fusen.3718.cn.pem /opt/
|
||||
COPY ./server.fusen.3718.cn.key /opt/
|
||||
CMD ["/www/fusenapi/api-home-user-auth-srv"]
|
||||
|
|
|
@ -2,5 +2,7 @@ FROM alpine
|
|||
|
||||
WORKDIR /www/fusenapi/
|
||||
COPY ./bin/api-map-library-srv /www/fusenapi/
|
||||
COPY ./etc /www/fusenapi/etc
|
||||
COPY ./env.yaml /opt/
|
||||
COPY ./server.fusen.3718.cn.pem /opt/
|
||||
COPY ./server.fusen.3718.cn.key /opt/
|
||||
CMD ["/www/fusenapi/api-map-library-srv"]
|
||||
|
|
|
@ -2,5 +2,7 @@ FROM alpine
|
|||
|
||||
WORKDIR /www/fusenapi/
|
||||
COPY ./bin/api-pay-srv /www/fusenapi/
|
||||
COPY ./etc /www/fusenapi/etc
|
||||
COPY ./env.yaml /opt/
|
||||
COPY ./server.fusen.3718.cn.pem /opt/
|
||||
COPY ./server.fusen.3718.cn.key /opt/
|
||||
CMD ["/www/fusenapi/api-pay-srv"]
|
||||
|
|
|
@ -2,5 +2,7 @@ FROM alpine
|
|||
|
||||
WORKDIR /www/fusenapi/
|
||||
COPY ./bin/api-product-model-srv /www/fusenapi/
|
||||
COPY ./etc /www/fusenapi/etc
|
||||
COPY ./env.yaml /opt/
|
||||
COPY ./server.fusen.3718.cn.pem /opt/
|
||||
COPY ./server.fusen.3718.cn.key /opt/
|
||||
CMD ["/www/fusenapi/api-product-model-srv"]
|
||||
|
|
|
@ -2,5 +2,7 @@ FROM alpine
|
|||
|
||||
WORKDIR /www/fusenapi/
|
||||
COPY ./bin/api-product-template-tag-srv /www/fusenapi/
|
||||
COPY ./etc /www/fusenapi/etc
|
||||
COPY ./env.yaml /opt/
|
||||
COPY ./server.fusen.3718.cn.pem /opt/
|
||||
COPY ./server.fusen.3718.cn.key /opt/
|
||||
CMD ["/www/fusenapi/api-product-template-tag-srv"]
|
||||
|
|
|
@ -2,5 +2,7 @@ FROM alpine
|
|||
|
||||
WORKDIR /www/fusenapi/
|
||||
COPY ./bin/api-product-template-srv /www/fusenapi/
|
||||
COPY ./etc /www/fusenapi/etc
|
||||
COPY ./env.yaml /opt/
|
||||
COPY ./server.fusen.3718.cn.pem /opt/
|
||||
COPY ./server.fusen.3718.cn.key /opt/
|
||||
CMD ["/www/fusenapi/api-product-template-srv"]
|
||||
|
|
|
@ -2,4 +2,7 @@ FROM alpine
|
|||
|
||||
WORKDIR /www/fusenapi/
|
||||
COPY ./bin/api-product-srv /www/fusenapi/
|
||||
COPY ./env.yaml /opt/
|
||||
COPY ./server.fusen.3718.cn.pem /opt/
|
||||
COPY ./server.fusen.3718.cn.key /opt/
|
||||
CMD ["/www/fusenapi/api-product-srv"]
|
||||
|
|
|
@ -2,5 +2,7 @@ FROM alpine
|
|||
|
||||
WORKDIR /www/fusenapi/
|
||||
COPY ./bin/api-shopping-cart-srv /www/fusenapi/
|
||||
COPY ./etc /www/fusenapi/etc
|
||||
COPY ./env.yaml /opt/
|
||||
COPY ./server.fusen.3718.cn.pem /opt/
|
||||
COPY ./server.fusen.3718.cn.key /opt/
|
||||
CMD ["/www/fusenapi/api-shopping-cart-srv"]
|
||||
|
|
|
@ -2,5 +2,7 @@ FROM alpine
|
|||
|
||||
WORKDIR /www/fusenapi/
|
||||
COPY ./bin/api-upload-srv /www/fusenapi/
|
||||
COPY ./etc /www/fusenapi/etc
|
||||
COPY ./env.yaml /opt/
|
||||
COPY ./server.fusen.3718.cn.pem /opt/
|
||||
COPY ./server.fusen.3718.cn.key /opt/
|
||||
CMD ["/www/fusenapi/api-upload-srv"]
|
||||
|
|
|
@ -2,5 +2,7 @@ FROM alpine
|
|||
|
||||
WORKDIR /www/fusenapi/
|
||||
COPY ./bin/api-webset-srv /www/fusenapi/
|
||||
COPY ./etc /www/fusenapi/etc
|
||||
COPY ./env.yaml /opt/
|
||||
COPY ./server.fusen.3718.cn.pem /opt/
|
||||
COPY ./server.fusen.3718.cn.key /opt/
|
||||
CMD ["/www/fusenapi/api-webset-srv"]
|
||||
|
|
|
@ -2,5 +2,7 @@ FROM alpine
|
|||
|
||||
WORKDIR /www/fusenapi/
|
||||
COPY ./bin/api-websocket-srv /www/fusenapi/
|
||||
COPY ./etc /www/fusenapi/etc
|
||||
COPY ./env.yaml /opt/
|
||||
COPY ./server.fusen.3718.cn.pem /opt/
|
||||
COPY ./server.fusen.3718.cn.key /opt/
|
||||
CMD ["/www/fusenapi/api-websocket-srv"]
|
||||
|
|
Loading…
Reference in New Issue
Block a user