5 Commits

Author SHA1 Message Date
shr
af4b947c22 👷 添加自动构建发布配置
All checks were successful
continuous-integration/drone/push Build is passing
2024-04-19 17:13:21 +08:00
8012bbec9f Merge pull request '修复CodeBrickZj没引入问题' (#5) from projects/mescc/lb into projects/mescc/develop
Reviewed-on: #5
2024-04-19 09:33:34 +08:00
DESKTOP-FUDKNA8\znjsz
bd0faef33f Merge branch 'projects/mescc/develop' into projects/mescc/lb 2024-04-19 09:18:10 +08:00
DESKTOP-FUDKNA8\znjsz
eb8c7bbfe4 1 2024-04-19 09:16:35 +08:00
DESKTOP-FUDKNA8\znjsz
d55dc7899f update main.js 2024-04-19 09:07:39 +08:00
5 changed files with 68 additions and 23 deletions

View File

@@ -1,3 +1,3 @@
.dockerignore
dist
#dist
node_modules

58
.drone.yml Normal file
View File

@@ -0,0 +1,58 @@
---
kind: pipeline
type: docker
name: default
steps:
- name: build
image: node:16-alpine
pull: if_not_exists
environment:
NODE_ENV: ""
commands:
- yarn install --frozen-lockfile
- env ${NODE_ENV} yarn build:prod
- name: publish
image: docker:dind
pull: if_not_exists
volumes:
- name: dockersock
path: /var/run/docker.sock
- name: dockerconfig
path: /root/.docker
commands:
- docker build -t hub.kszny.picaiba.com/kszny/glass-ui ./
- docker push hub.kszny.picaiba.com/kszny/glass-ui
depends_on:
- build
- name: deploy
image: appleboy/drone-ssh
pull: if-not-exists
settings:
host:
- 172.24.145.74
username: root
password: Root@123
port: 22
command_timeout: 2m
script:
- docker pull hub.kszny.picaiba.com/kszny/glass-ui
- docker run --rm -v /data/www/ksznpt:/tmp hub.kszny.picaiba.com/kszny/glass-ui sh -c "rm -rf /tmp/* && mv -f /html /tmp"
depends_on:
- publish
volumes:
- name: dockersock
host:
path: /var/run/docker.sock
- name: dockerconfig
host:
path: /root/.docker
trigger:
branch:
- projects/mescc/develop
event:
- push

View File

@@ -1,21 +1,3 @@
FROM node:16-alpine as build-stage
WORKDIR /admim
COPY .npmrc package.json yarn.lock ./
RUN --mount=type=cache,id=yarn-store,target=/root/.yarn-store \
yarn install --frozen-lockfile
COPY . .
ARG NODE_ENV=""
RUN env ${NODE_ENV} yarn build:prod
## -- stage: dist => nginx --
FROM nginx:alpine
ENV TZ=Asia/Shanghai
COPY ./nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=build-stage /admim/dist /usr/share/nginx/html
EXPOSE 80
FROM busybox
LABEL maintainer thomas.hairong@gmail.com
COPY dist /html/

View File

@@ -41,7 +41,7 @@ import {
getDictDatas,
getDictDatas2,
} from "@/utils/dict";
import CodeBrickZj from 'code-brick-zj';
import "./theme/index.css"; // 自定义主题包 - code-brick-zj
// 全局方法挂载

View File

@@ -3141,6 +3141,11 @@
"chalk" "^2.4.1"
"q" "^1.1.2"
"code-brick-zj@^1.1.0":
"integrity" "sha512-J6S5ILHdweYMiEfpLuU8EvgQNEJ4EMAvjBAbLRtpGOBtXNX4U7z+IB9jDu2FE1TdkOaKJUpVLubgZwxkGzXNaA=="
"resolved" "https://registry.npmmirror.com/code-brick-zj/-/code-brick-zj-1.1.0.tgz"
"version" "1.1.0"
"collection-visit@^1.0.0":
"integrity" "sha512-lNkKvzEeMBBjUGHZ+q6z9pSJla0KWAQPvtzhEV9+iGyQYG+pBpl7xKDhxoNSOZH2hhv0v5k0y2yAM4o4SjoSkw=="
"resolved" "https://registry.npmmirror.com/collection-visit/-/collection-visit-1.0.0.tgz"