Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
activities
/
web-lottery
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
1
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
d31da7f9
authored
Nov 18, 2021
by
赖慧粮
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(cbnclouds): private config
parent
fce36c58
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
69 additions
and
0 deletions
+69
-0
build.yml
+15
-0
cbncloudsDockerfile
+18
-0
cbncloudsStart.sh
+7
-0
config/cbnclouds.private.js
+10
-0
package.json
+4
-0
pm2.json
+15
-0
No files found.
build.yml
View file @
d31da7f9
...
@@ -45,3 +45,18 @@ huawei:
...
@@ -45,3 +45,18 @@ huawei:
command
:
command
:
build
:
build:huawei
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
cbncloudsDockerfile
0 → 100644
View file @
d31da7f9
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/open_images/node12.13.1-pm2
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:cbnclouds
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 cbncloudsStart.sh
ENTRYPOINT ["./cbncloudsStart.sh"]
cbncloudsStart.sh
0 → 100644
View file @
d31da7f9
#!/bin/sh
yarn run pm2:cbnclouds
while
true
do
sleep 5
;
done
config/cbnclouds.private.js
0 → 100644
View file @
d31da7f9
/* 正式:私有化部署(private)环境变量 */
module
.
exports
=
{
X_CA_STAGE
:
''
,
API_DOMAIN
:
'//cgateway.huaguangyun.cn/v1'
,
OSS_DOMAIN
:
'//gd-resource.cbnclouds.cn'
,
ROP_DOMAIN
:
'cbnclouds.cn'
,
private
:
true
,
privateType
:
'cbnclouds'
,
run_port
:
4002
,
}
package.json
View file @
d31da7f9
...
@@ -12,6 +12,7 @@
...
@@ -12,6 +12,7 @@
"serve:vvku"
:
"cross-env mode=vvku.private nuxt"
,
"serve:vvku"
:
"cross-env mode=vvku.private nuxt"
,
"serve:cbn"
:
"cross-env mode=cbn.private nuxt"
,
"serve:cbn"
:
"cross-env mode=cbn.private nuxt"
,
"serve:huawei"
:
"cross-env mode=huawei.private nuxt"
,
"serve:huawei"
:
"cross-env mode=huawei.private nuxt"
,
"serve:cbnclouds"
:
"cross-env mode=cbnclouds.private nuxt"
,
"build"
:
"cross-env mode=dev nuxt build"
,
"build"
:
"cross-env mode=dev nuxt build"
,
"build:dev"
:
"cross-env mode=dev nuxt build"
,
"build:dev"
:
"cross-env mode=dev nuxt build"
,
"build:pre"
:
"cross-env mode=pre nuxt build"
,
"build:pre"
:
"cross-env mode=pre nuxt build"
,
...
@@ -20,6 +21,7 @@
...
@@ -20,6 +21,7 @@
"build:vvku"
:
"cross-env mode=vvku.private nuxt build"
,
"build:vvku"
:
"cross-env mode=vvku.private nuxt build"
,
"build:cbn"
:
"cross-env mode=cbn.private nuxt build"
,
"build:cbn"
:
"cross-env mode=cbn.private nuxt build"
,
"build:huawei"
:
"cross-env mode=huawei.private nuxt build"
,
"build:huawei"
:
"cross-env mode=huawei.private nuxt build"
,
"build:cbnclouds"
:
"cross-env mode=cbnclouds.private nuxt build"
,
"start"
:
"cross-env mode=dev nuxt start"
,
"start"
:
"cross-env mode=dev nuxt start"
,
"start:dev"
:
"cross-env mode=dev nuxt start"
,
"start:dev"
:
"cross-env mode=dev nuxt start"
,
"start:pre"
:
"cross-env mode=pre nuxt start"
,
"start:pre"
:
"cross-env mode=pre nuxt start"
,
...
@@ -28,6 +30,7 @@
...
@@ -28,6 +30,7 @@
"start:vvku"
:
"cross-env mode=vvku.private nuxt start"
,
"start:vvku"
:
"cross-env mode=vvku.private nuxt start"
,
"start:cbn"
:
"cross-env mode=cbn.private nuxt start"
,
"start:cbn"
:
"cross-env mode=cbn.private nuxt start"
,
"start:huawei"
:
"cross-env mode=huawei.private nuxt start"
,
"start:huawei"
:
"cross-env mode=huawei.private nuxt start"
,
"start:cbnclouds"
:
"cross-env mode=cbnclouds.private nuxt start"
,
"pm2:dev"
:
"pm2 start pm2.json --only lottery_test"
,
"pm2:dev"
:
"pm2 start pm2.json --only lottery_test"
,
"pm2:pre"
:
"pm2 start pm2.json --only lottery_pre"
,
"pm2:pre"
:
"pm2 start pm2.json --only lottery_pre"
,
"pm2"
:
"pm2 start pm2.json --only lottery"
,
"pm2"
:
"pm2 start pm2.json --only lottery"
,
...
@@ -35,6 +38,7 @@
...
@@ -35,6 +38,7 @@
"pm2:vvku"
:
"pm2 start pm2.json --only lottery_vvku"
,
"pm2:vvku"
:
"pm2 start pm2.json --only lottery_vvku"
,
"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"
,
"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"
,
...
...
pm2.json
View file @
d31da7f9
...
@@ -104,6 +104,21 @@
...
@@ -104,6 +104,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_cbnclouds"
,
"script"
:
"npm"
,
"args"
:
"run start:cbnclouds"
,
"instances"
:
"max"
,
"exec_mode"
:
"cluster"
,
"autorestart"
:
true
,
"max_memory_restart"
:
"8G"
,
"env"
:
{
"port"
:
4002
,
"NODE_ENV"
:
"production"
},
"error_file"
:
"./logs/app-err.log"
,
"out_file"
:
"./logs/app-out.log"
}
}
]
]
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment