Compare commits
3 Commits
projects/m
...
2ee66714ca
| Author | SHA1 | Date | |
|---|---|---|---|
| 2ee66714ca | |||
| ab5867c4fd | |||
| 9a53391999 |
@@ -1,3 +1,3 @@
|
|||||||
.dockerignore
|
.dockerignore
|
||||||
dist
|
#dist
|
||||||
node_modules
|
node_modules
|
||||||
|
|||||||
59
.drone.yml
Normal file
59
.drone.yml
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
---
|
||||||
|
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
|
||||||
|
- yarn install
|
||||||
|
- 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/xcac-ui ./
|
||||||
|
- docker push hub.kszny.picaiba.com/kszny/xcac-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/xcac-ui
|
||||||
|
- docker run --rm -v /data/www/xcac:/tmp hub.kszny.picaiba.com/kszny/xcac-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/mesxc-test
|
||||||
|
event:
|
||||||
|
- push
|
||||||
3
.env.dev
3
.env.dev
@@ -13,7 +13,8 @@ VUE_APP_TITLE = MES系统
|
|||||||
|
|
||||||
# 芋道管理系统/开发环境
|
# 芋道管理系统/开发环境
|
||||||
VUE_APP_BASE_API = 'http://192.168.0.33:48082'
|
VUE_APP_BASE_API = 'http://192.168.0.33:48082'
|
||||||
# VUE_APP_BASE_API = 'http://192.168.4.176:48082'
|
# VUE_APP_BASE_API = 'http://xcac.mes.picaiba.com/'
|
||||||
|
# VUE_APP_BASE_API = 'http://10.70.2.2:8080'
|
||||||
# 积木报表指向地址
|
# 积木报表指向地址
|
||||||
VUE_APP_JIMU_API = 'http://192.168.1.101:48082'
|
VUE_APP_JIMU_API = 'http://192.168.1.101:48082'
|
||||||
|
|
||||||
|
|||||||
24
Dockerfile
24
Dockerfile
@@ -1,21 +1,3 @@
|
|||||||
FROM node:16-alpine as build-stage
|
FROM busybox
|
||||||
|
LABEL maintainer thomas.hairong@gmail.com
|
||||||
WORKDIR /admim
|
COPY dist /html/
|
||||||
|
|
||||||
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
|
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ export default {
|
|||||||
color: this.colors,
|
color: this.colors,
|
||||||
title: {
|
title: {
|
||||||
text: num,
|
text: num,
|
||||||
subtext: '总数',
|
subtext: '总数/个',
|
||||||
top: '32%',
|
top: '32%',
|
||||||
left: '49%',
|
left: '49%',
|
||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
|
|||||||
@@ -66,8 +66,10 @@ export default {
|
|||||||
`<span title=${item.name || ''}>${item.name || ''}</span>`,
|
`<span title=${item.name || ''}>${item.name || ''}</span>`,
|
||||||
`<span title=${item.code || ''}>${item.code || ''}</span>`,
|
`<span title=${item.code || ''}>${item.code || ''}</span>`,
|
||||||
`<span><div style="${
|
`<span><div style="${
|
||||||
item.status == '正常'
|
item.status == '运行'
|
||||||
? 'box-shadow: 0px 0px 2px 1px #2760FF;width:6px;height:6px;border-radius: 50%;background-color: #2760FF;float:left;margin:13px 10px 0 0 '
|
? 'box-shadow: 0px 0px 2px 1px #2760FF;width:6px;height:6px;border-radius: 50%;background-color: #2760FF;float:left;margin:13px 10px 0 0 '
|
||||||
|
: item.status == '故障'
|
||||||
|
? 'box-shadow: 0px 0px 2px 1px red;width:6px;height:6px;border-radius: 50%; background-color: red;float:left;margin:13px 10px 0 0 '
|
||||||
: 'box-shadow: 0px 0px 2px 1px #FFBD02;width:6px;height:6px;border-radius: 50%; background-color: #FFBD02;float:left;margin:13px 10px 0 0 '
|
: 'box-shadow: 0px 0px 2px 1px #FFBD02;width:6px;height:6px;border-radius: 50%; background-color: #FFBD02;float:left;margin:13px 10px 0 0 '
|
||||||
}"></div> ${item.status || ''}</span>`,
|
}"></div> ${item.status || ''}</span>`,
|
||||||
`<span"><div style="${
|
`<span"><div style="${
|
||||||
|
|||||||
Reference in New Issue
Block a user