Compare commits
No commits in common. "aee1e06137ba15242294cb78aa6265645bdaf0bd" and "622a8b4a3153663dc4372f8f837936f708bcd259" have entirely different histories.
aee1e06137
...
622a8b4a31
@ -1,3 +1,3 @@
|
||||
.dockerignore
|
||||
#dist
|
||||
dist
|
||||
node_modules
|
||||
|
58
.drone.yml
58
.drone.yml
@ -1,58 +0,0 @@
|
||||
---
|
||||
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
|
@ -2,15 +2,15 @@
|
||||
NODE_ENV = 'production'
|
||||
|
||||
# 页面标题
|
||||
VUE_APP_TITLE = 玻璃控股信息平台
|
||||
VUE_APP_TITLE = 芋道管理系统
|
||||
|
||||
# 芋道管理系统/生产环境
|
||||
VUE_APP_BASE_API = ''
|
||||
VUE_APP_BASE_API = '/prod-api'
|
||||
|
||||
# 根据服务器或域名修改
|
||||
PUBLIC_PATH = ''
|
||||
PUBLIC_PATH = 'http://my-pi.com:8888/yudao-admin/'
|
||||
# 二级部署路径
|
||||
# VUE_APP_APP_NAME ='yudao-admin'
|
||||
VUE_APP_APP_NAME ='yudao-admin'
|
||||
|
||||
# 多租户的开关
|
||||
VUE_APP_TENANT_ENABLE = true
|
||||
|
24
Dockerfile
24
Dockerfile
@ -1,3 +1,21 @@
|
||||
FROM busybox
|
||||
LABEL maintainer thomas.hairong@gmail.com
|
||||
COPY dist /html/
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user