Commit 8a25b2f2 by Lays-lzq

feat: 新增cuc

parent 5df2c40e
# build.yml
version: 1.0
vvku:
config:
spa: false
ssr: true
folder: nuxt-dist
proxy: http://172.17.0.1:4002
server: /web\.vvku\.com/
target:
project: Web
location: lottery
command:
build: build:vvku
cbn:
config:
spa: false
ssr: true
folder: nuxt-dist
proxy: http://172.17.0.1:4002
server: /web\.cbnbn\.cn/
target:
project: Web
location: lottery
command:
build: build:cbn
huawei:
config:
spa: false
ssr: true
folder: nuxt-dist
proxy: http://172.17.0.1:34002
server: /web\.huaguangyun\.cn/
target:
project: Web
location: lottery
command:
build: build:huawei
cbnclouds:
config:
spa: false
ssr: true
folder: nuxt-dist
proxy: http://172.17.0.1:4002
server: /web\.cbnclouds\.cn/
target:
project: Web
location: lottery
command:
build: build:cbnclouds
FROM alpine AS builder
WORKDIR /home/app
RUN apk add --no-cache --update nodejs yarn
COPY package.json yarn.lock ./
RUN yarn install --registry=https://registry.yarnpkg.com
FROM registry.cn-hangzhou.aliyuncs.com/cduan/customer-resource-base:zabbix
ADD ./ /var/www/web_lottery
ENV HOST 0.0.0.0
ENV TZ Asia/Shanghai
WORKDIR /var/www/web_lottery
COPY --from=builder /home/app/package.json ./package.json
COPY --from=builder /home/app/node_modules ./node_modules
RUN yarn build:cuc
RUN rm -rf assets components layouts middleware pages plugins store .eslintrc.js .gitignore build.yml Dockerfile README.md start.sh
EXPOSE 4002
RUN chmod +x cucStart.sh
ENTRYPOINT ["./cucStart.sh"]
\ No newline at end of file
#!/bin/sh
yarn run pm2:cuc
while true
do
sleep 5;
done
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
"build:cbn": "cross-env mode=cbn nuxt build", "build:cbn": "cross-env mode=cbn nuxt build",
"build:huawei": "cross-env mode=huawei nuxt build", "build:huawei": "cross-env mode=huawei nuxt build",
"build:cbnclouds": "cross-env mode=cbnclouds nuxt build", "build:cbnclouds": "cross-env mode=cbnclouds nuxt build",
"build:cuc": "cross-env mode=cuc nuxt build",
"start:dev": "cross-env mode=test nuxt start", "start:dev": "cross-env mode=test nuxt start",
"start:pre": "cross-env mode=preview nuxt start", "start:pre": "cross-env mode=preview nuxt start",
"start:prod": "cross-env mode=production nuxt start", "start:prod": "cross-env mode=production nuxt start",
...@@ -36,6 +37,7 @@ ...@@ -36,6 +37,7 @@
"pm2:cbn": "pm2 start pm2.json --only lottery-cbn", "pm2:cbn": "pm2 start pm2.json --only lottery-cbn",
"pm2:huawei": "pm2 start pm2.json --only lottery-huawei", "pm2:huawei": "pm2 start pm2.json --only lottery-huawei",
"pm2:cbnclouds": "pm2 start pm2.json --only lottery-cbnclouds", "pm2:cbnclouds": "pm2 start pm2.json --only lottery-cbnclouds",
"pm2:cuc": "pm2 start pm2.json --only lottery-cuc",
"generate": "nuxt generate", "generate": "nuxt generate",
"lint:js": "eslint --ext \".js,.vue\" --ignore-path .gitignore .", "lint:js": "eslint --ext \".js,.vue\" --ignore-path .gitignore .",
"lint:style": "stylelint \"**/*.{vue,css}\" --ignore-path .gitignore", "lint:style": "stylelint \"**/*.{vue,css}\" --ignore-path .gitignore",
...@@ -82,4 +84,4 @@ ...@@ -82,4 +84,4 @@
"postcss-pxtorem": "^5.1.1", "postcss-pxtorem": "^5.1.1",
"prettier": "^2.3.2" "prettier": "^2.3.2"
} }
} }
\ No newline at end of file
...@@ -119,6 +119,21 @@ ...@@ -119,6 +119,21 @@
}, },
"error_file": "./logs/app-err.log", "error_file": "./logs/app-err.log",
"out_file": "./logs/app-out.log" "out_file": "./logs/app-out.log"
},
{
"name": "lottery-cuc",
"script": "npm",
"args": "run start:cuc",
"instances": "max",
"exec_mode": "cluster",
"autorestart": true,
"max_memory_restart": "32G",
"env": {
"mode": "cuc",
"NODE_ENV": "production"
},
"error_file": "./logs/app-err.log",
"out_file": "./logs/app-out.log"
} }
] ]
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment