mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-student.git
synced 2025-12-06 17:36:46 +08:00
接口初始化 第一版
This commit is contained in:
67
.drone.yml
Normal file
67
.drone.yml
Normal file
@@ -0,0 +1,67 @@
|
||||
kind: pipeline
|
||||
name: fe-str
|
||||
|
||||
steps:
|
||||
- name: restore-cache
|
||||
image: drillster/drone-volume-cache
|
||||
settings:
|
||||
restore: true
|
||||
mount:
|
||||
- ./.npm-cache
|
||||
- ./node_modules
|
||||
volumes:
|
||||
- name: cache
|
||||
path: /cache
|
||||
|
||||
- name: npm-install
|
||||
image: node:16.13.1-alpine
|
||||
commands:
|
||||
- npm config set cache ./.npm-cache --global
|
||||
- npm config set registry http://registry.npm.taobao.org/
|
||||
- npm install && npm run build
|
||||
|
||||
- name: rebuild-cache
|
||||
image: drillster/drone-volume-cache
|
||||
settings:
|
||||
rebuild: true
|
||||
mount:
|
||||
- ./.npm-cache
|
||||
- ./node_modules
|
||||
volumes:
|
||||
- name: cache
|
||||
path: /cache
|
||||
|
||||
- name: build-fe-stu
|
||||
image: plugins/docker
|
||||
privileged: true
|
||||
volumes:
|
||||
- name: registry-auth
|
||||
path: /root/.docker
|
||||
- name: dockersock
|
||||
path: /var/run/docker.sock
|
||||
settings:
|
||||
registry: swr.cn-south-1.myhuaweicloud.com
|
||||
repo: swr.cn-south-1.myhuaweicloud.com/yp/fe-stu
|
||||
tags: latest
|
||||
|
||||
- name: release
|
||||
image: docker:dind
|
||||
volumes:
|
||||
- name: dockersock
|
||||
path: /var/run/docker.sock
|
||||
- name: registry-auth
|
||||
path: /root/.docker
|
||||
commands:
|
||||
- docker stack deploy -c docker-compose.yml fe-stu --with-registry-auth
|
||||
|
||||
|
||||
volumes:
|
||||
- name: cache
|
||||
host:
|
||||
path: /tmp/cache
|
||||
- name: dockersock
|
||||
host:
|
||||
path: /var/run/docker.sock
|
||||
- name: registry-auth
|
||||
host:
|
||||
path: /root/.docker
|
||||
6
Dockerfile
Normal file
6
Dockerfile
Normal file
@@ -0,0 +1,6 @@
|
||||
FROM devforth/spa-to-http:latest
|
||||
WORKDIR /
|
||||
|
||||
ADD ./dist .
|
||||
|
||||
EXPOSE 8080
|
||||
13
docker-compose.yml
Normal file
13
docker-compose.yml
Normal file
@@ -0,0 +1,13 @@
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
buyer-ui-mro84:
|
||||
image: swr.cn-south-1.myhuaweicloud.com/yp/fe-stu
|
||||
networks:
|
||||
- traefik
|
||||
deploy:
|
||||
mode: replicated
|
||||
replicas: 1
|
||||
networks:
|
||||
traefik:
|
||||
external: true
|
||||
@@ -4,7 +4,7 @@
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"serve": "vite build && vite preview",
|
||||
"server": "vite build && vite preview",
|
||||
"build": "vite build"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
Reference in New Issue
Block a user