Browse Source

test

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

69
.drone.yml

@ -6,60 +6,41 @@ branches: [ master,develop,uat ]
pipeline: pipeline:
# build:
# image: node
# commands:
# - yarn config set registry https://registry.npm.taobao.org/
# - yarn install
# - yarn build:dev
docker-dev: install:
image: plugins/docker image: node:16-alpine
repo: registry.cn-shenzhen.aliyuncs.com/ax-stor/ax-bkb-cusotmer-web commands:
registry: registry.cn-shenzhen.aliyuncs.com - yarn install # 也可以使用 npm install
use_cache: true
dockerfile: DockerfileDev
secrets: [ docker_username, docker_password ]
tags: latest
when:
branch: develop
docker-uat: build:
image: plugins/docker image: node:16-alpine
repo: registry.cn-shenzhen.aliyuncs.com/ax-stor/ax-bkb-cusotmer-web commands:
registry: registry.cn-shenzhen.aliyuncs.com - yarn run build:test
use_cache: true
dockerfile: DockerfileUat
secrets: [ docker_username, docker_password ]
tags: latest
when: when:
branch: uat event: push
branch: develop
docker-prod: docker-dev:
image: plugins/docker 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 registry: registry.cn-shenzhen.aliyuncs.com
use_cache: true use_cache: true
dockerfile: DockerfileProd dockerfile: DockerfileDev
secrets: [ docker_username, docker_password ] secrets: [ docker_username, docker_password ]
tags: v1.0.0 tags: bh5-web
when: when:
branch: master branch: develop
deploy-dev: deploy-dev:
image: roffe/kubectl image: appleboy/drone-ssh
commands: host: 1.92.109.79
- rm -rf /root/.kube && cp -r .kube /root username: root
- kubectl delete -f deployUat.yaml || true password:
- kubectl apply -f deployUat.yaml 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: when:
branch: develop 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

8
nginxDev.conf

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

Loading…
Cancel
Save