Browse Source

test

develop
文武 6 months ago
parent
commit
d01be780d8
  1. 75
      .drone.yml
  2. 8
      nginxDev.conf

75
.drone.yml

@ -6,60 +6,41 @@ branches: [ master,develop,uat ]
pipeline:
# build:
# image: node
# commands:
# - yarn config set registry https://registry.npm.taobao.org/
# - yarn install
# - yarn build:dev
docker-dev:
image: plugins/docker
repo: registry.cn-shenzhen.aliyuncs.com/ax-stor/ax-bkb-cusotmer-web
registry: registry.cn-shenzhen.aliyuncs.com
use_cache: true
dockerfile: DockerfileDev
secrets: [ docker_username, docker_password ]
tags: latest
when:
branch: develop
install:
image: node:16-alpine
commands:
- yarn install # 也可以使用 npm install
docker-uat:
image: plugins/docker
repo: registry.cn-shenzhen.aliyuncs.com/ax-stor/ax-bkb-cusotmer-web
registry: registry.cn-shenzhen.aliyuncs.com
use_cache: true
dockerfile: DockerfileUat
secrets: [ docker_username, docker_password ]
tags: latest
build:
image: node:16-alpine
commands:
- yarn run build:test
when:
branch: uat
event: push
branch: develop
docker-prod:
docker-dev:
image: plugins/docker
repo: registry.cn-shenzhen.aliyuncs.com/ax-stor/ax-bkb-cusotmer-web
repo: registry.cn-shenzhen.aliyuncs.com/ax-stor/ax-bkb-seller
registry: registry.cn-shenzhen.aliyuncs.com
use_cache: true
dockerfile: DockerfileProd
dockerfile: DockerfileDev
secrets: [ docker_username, docker_password ]
tags: v1.0.0
tags: bh5-web
when:
branch: master
deploy-dev:
image: roffe/kubectl
commands:
- rm -rf /root/.kube && cp -r .kube /root
- kubectl delete -f deployUat.yaml || true
- kubectl apply -f deployUat.yaml
when:
branch: develop
deploy-uat:
image: roffe/kubectl
commands:
- rm -rf /root/.kube && cp -r .kube /root
- kubectl delete -f deployDev.yaml || true
- kubectl apply -f deployDev.yaml
when:
branch: uat
deploy-dev:
image: appleboy/drone-ssh
host: 1.92.109.79
username: root
password:
from_secret: ssh_password
port: 22 # 可选,指定 SSH 端口,默认为 22
script:
- docker rm -f bh5-web
- docker pull registry.cn-shenzhen.aliyuncs.com/ax-stor/ax-bkb-seller:bh5-web
- docker run --name=bh5-web -p 30103:83 -d registry.cn-shenzhen.aliyuncs.com/ax-stor/ax-bkb-seller:bh5-web
when:
branch: develop

8
nginxDev.conf

@ -8,12 +8,14 @@ server {
index index.html index.htm;
error_page 405 =200 /index.html;
try_files $uri $uri/ /index.html;
client_max_body_size 500m;
}
location /api/ {
client_max_body_size 500m;
proxy_pass http://ax-api.sumweal.com/bkb-customer/;
proxy_pass http://1.92.109.79:30204/;
}
location /minio/ {
proxy_pass https://ax-api.sumweal.com/minio/;
}
error_page 404 /404.html;

Loading…
Cancel
Save