Ver código fonte

Merge branch 'develop'

feat
JinxChen 2 anos atrás
pai
commit
ed5ad75587
4 arquivos alterados com 89 adições e 2 exclusões
  1. +3
    -2
      README.md
  2. +27
    -0
      setup_development.sh
  3. +30
    -0
      setup_production.sh
  4. +29
    -0
      setup_test.sh

+ 3
- 2
README.md Ver arquivo

@@ -1,7 +1,7 @@
<!--
* @Date: 2022-01-19 10:08:58
* @LastEditors: JinxChen
* @LastEditTime: 2022-02-25 14:44:25
* @LastEditTime: 2022-02-25 15:02:24
* @FilePath: \AntpayFrontEnd\README.md
* @description: readme说明文档
-->
@@ -49,4 +49,5 @@ build
- 初版发布
- 完成 项目搭建
- 完成 项目迁移 从documentFrontEndWeb 到 AlipayFrontendWeb
- 增加 docker部署脚本
- 增加 docker部署脚本
- 增加 环境设置脚本

+ 27
- 0
setup_development.sh Ver arquivo

@@ -0,0 +1,27 @@
###
# @Author: your name
# @Date: 2020-07-02 10:34:00
# @LastEditTime: 2022-02-25 15:01:41
# @LastEditors: JinxChen
# @Description: In User Settings Edit
# @FilePath: \AntpayFrontEnd\setup_development.sh
###
#!/bin/bash
npm -v
npm config set registry https://registry.npm.taobao.org
npm install
npm run build-dev
image_version=`date +%Y%m%d%H%M`;
docker stop antpay_frontend_web || true;
docker rm antpay_frontend_web || true;
# 删除镜像
docker rmi -f $(docker images | grep telpo/antpay_frontend_web | awk '{print $3}')
# 构建telpo/mrp:$image_version镜像
docker build --no-cache . -t telpo/antpay_frontend_web:$image_version;
#删除产生的None镜像
docker rmi -f $(docker images | grep none | awk '{print $3}')
# 查看镜像列表
docker images;
docker run -p 8804:80 -d --restart=always --name antpay_frontend_web telpo/antpay_frontend_web:$image_version;
# 查看日志
docker logs antpay_frontend_web;

+ 30
- 0
setup_production.sh Ver arquivo

@@ -0,0 +1,30 @@
###
# @Author: your name
# @Date: 2020-07-02 10:34:59
# @LastEditTime: 2022-02-25 15:01:53
# @LastEditors: JinxChen
# @Description: In User Settings Edit
# @FilePath: \AntpayFrontEnd\setup_production.sh
###
#!/bin/bash
npm -v
npm config set registry https://registry.npm.taobao.org
npm install
npm run build
image_version=$version;
# 删除镜像
docker rmi -f $(docker images | grep registry.cn-shanghai.aliyuncs.com/tolpo_platform/antpay_frontend_web | awk '{print $3}')
# 构建telpo/mrp:$image_version镜像
docker build --no-cache . -t telpo/antpay_frontend_web:$image_version;
#TODO:推送镜像到阿里仓库
echo '=================开始推送镜像======================='
#docker login --username=telpo_linwl@1111649216405698 --password=telpo#1234 registry.cn-shanghai.aliyuncs.com
#docker login --username=telpo_fengjj@1111649216405698 --password=PWDaliyun123 registry.cn-shanghai.aliyuncs.com
docker login --username=rzl_wangjx@1111649216405698 --password=telpo.123 registry.cn-shanghai.aliyuncs.com
docker tag telpo/antpay_frontend_web:$image_version registry.cn-shanghai.aliyuncs.com/tolpo_platform/antpay_frontend_web:$image_version
docker push registry.cn-shanghai.aliyuncs.com/tolpo_platform/antpay_frontend_web:$image_version
echo '=================推送镜像完成======================='
#删除产生的None镜像
docker rmi -f $(docker images | grep none | awk '{print $3}')
# 查看镜像列表
docker images;

+ 29
- 0
setup_test.sh Ver arquivo

@@ -0,0 +1,29 @@
###
# @Author: your name
# @Date: 2020-07-02 10:34:59
# @LastEditTime: 2022-02-25 15:02:07
# @LastEditors: JinxChen
# @Description: In User Settings Edit
# @FilePath: \AntpayFrontEnd\setup_test.sh
###
#!/bin/bash
npm -v
npm config set registry https://registry.npm.taobao.org
npm install
npm run build-test
image_version=$version;
# 删除镜像
docker rmi -f $(
docker images | grep 139.224.254.18:5000/antpay_frontend_web | awk '{print $3}'
)
# 构建telpo/mrp:$image_version镜像
docker build --no-cache . -t telpo/antpay_frontend_web:$image_version;
#TODO:推送镜像到私有仓库
echo '=================开始推送镜像======================='
docker tag telpo/antpay_frontend_web:$image_version 139.224.254.18:5000/antpay_frontend_web:$image_version
docker push 139.224.254.18:5000/antpay_frontend_web:$image_version
echo '=================推送镜像完成======================='
#删除产生的None镜像
docker rmi -f $(docker images | grep none | awk '{print $3}')
# 查看镜像列表
docker images;

Carregando…
Cancelar
Salvar