Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
op-web-service
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bp
op-web-service
Commits
2ddec0d6
Commit
2ddec0d6
authored
Jun 08, 2021
by
lvweichao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
792912c3
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
9 deletions
+12
-9
deploy-config.sh
deploy/deploy_configs/deploy-config.sh
+2
-2
deploy-prod-config.sh
deploy_ci/deploy_configs/deploy-prod-config.sh
+3
-3
config.js
server/config.js
+1
-1
utils.js
server/controllers/utils.js
+2
-2
main.js
src/main.js
+4
-1
No files found.
deploy/deploy_configs/deploy-config.sh
View file @
2ddec0d6
...
@@ -3,12 +3,12 @@
...
@@ -3,12 +3,12 @@
QA_PRE_START_CMD
=
""
#用于测试环境在START_CMDS执行之前执行,一般用来去掉服务启动时候的内存要求。
QA_PRE_START_CMD
=
""
#用于测试环境在START_CMDS执行之前执行,一般用来去掉服务启动时候的内存要求。
START_CMDS
=
"cd /home/services/ ; sh start.sh
${
TARGET_ENV
}
"
#进入docker container以后的服务启动命令
START_CMDS
=
"cd /home/services/ ; sh start.sh
${
TARGET_ENV
}
"
#进入docker container以后的服务启动命令
DOCKER_PORT_MAPS
=
"90
08:9008
"
#宿>主机端口:container内部端口的映射关系
DOCKER_PORT_MAPS
=
"90
12:9012
"
#宿>主机端口:container内部端口的映射关系
DOCKER_VOLUMN_MAPS
=
"~/_logs/
${
COMPONENT
}
-
${
TARGET_ENV
}
:/home/services/op-web-service/logs"
#宿主机目录和container内部的目录映射关系
DOCKER_VOLUMN_MAPS
=
"~/_logs/
${
COMPONENT
}
-
${
TARGET_ENV
}
:/home/services/op-web-service/logs"
#宿主机目录和container内部的目录映射关系
DOCKER_RUN_OPTIONS
=
"--net=host"
#docker启动时候额外的特殊的启动参数
DOCKER_RUN_OPTIONS
=
"--net=host"
#docker启动时候额外的特殊的启动参数
DOCKER_PRESTOP_CMD
=
""
#停止容器之前,执行的一些清理操作
DOCKER_PRESTOP_CMD
=
""
#停止容器之前,执行的一些清理操作
SERVICE_PORT
=
"90
08
"
#服务的端口
SERVICE_PORT
=
"90
12
"
#服务的端口
DONT_CHECK_PORT
=
'false'
#如果服务不启动端口,那么这个设置为false
DONT_CHECK_PORT
=
'false'
#如果服务不启动端口,那么这个设置为false
#只用于线上部署,服务降级命令(纯字符串,使用单括号),如果部署时downgrade_flag设置成true, 则在部署完成后,enable haproxy之前,在部署的container内部执行这个命令
#只用于线上部署,服务降级命令(纯字符串,使用单括号),如果部署时downgrade_flag设置成true, 则在部署完成后,enable haproxy之前,在部署的container内部执行这个命令
...
...
deploy_ci/deploy_configs/deploy-prod-config.sh
View file @
2ddec0d6
...
@@ -7,7 +7,7 @@ START_CMDS="tar zxf webui_opwebservice_package.tar.gz -C opservice.yidianzixun.c
...
@@ -7,7 +7,7 @@ START_CMDS="tar zxf webui_opwebservice_package.tar.gz -C opservice.yidianzixun.c
CONTAINER_NAMES
=
"webui-opwebservice-
${
env
}
"
CONTAINER_NAMES
=
"webui-opwebservice-
${
env
}
"
# Port maps for each container, one map a line, same order with $start_cmds
# Port maps for each container, one map a line, same order with $start_cmds
DOCKER_PORT_MAPS
=
"90
08
:8055"
DOCKER_PORT_MAPS
=
"90
12
:8055"
# This is for changing container name, remove old containers when deploy new one
# This is for changing container name, remove old containers when deploy new one
OLD_CONTAINER_NAMES
=
"
OLD_CONTAINER_NAMES
=
"
...
@@ -23,10 +23,10 @@ DOCKER_VOLUMN_MAPS="
...
@@ -23,10 +23,10 @@ DOCKER_VOLUMN_MAPS="
# Other docker run options
# Other docker run options
DOCKER_RUN_OPTIONS
=
""
DOCKER_RUN_OPTIONS
=
""
# Image name
# Image name
IMAGE_NAME
=
"docker2.yidian.com:5000/publish/webui-opwebservice-master-
${
COMMIT_NUMBER
}
-image"
IMAGE_NAME
=
"docker2.yidian.com:5000/publish/webui-opwebservice-master-
${
release_number
}
-image"
# This is for stopping container, kill sepicify process inside the container before 'docker stop' and 'docker rm'
# This is for stopping container, kill sepicify process inside the container before 'docker stop' and 'docker rm'
DOCKER_PRESTOP_CMD
=
""
DOCKER_PRESTOP_CMD
=
""
# Service port for apitest
# Service port for apitest
SERVICE_PORT
=
"90
08
"
SERVICE_PORT
=
"90
12
"
# Service port inside container
# Service port inside container
ORIGIN_SERVICE_PORT
=
"8055"
ORIGIN_SERVICE_PORT
=
"8055"
server/config.js
View file @
2ddec0d6
...
@@ -14,7 +14,7 @@ const PANDORA_URI = {
...
@@ -14,7 +14,7 @@ const PANDORA_URI = {
}
}
const
API_INTERNAL_URI
=
{
const
API_INTERNAL_URI
=
{
'development'
:
"http://bp-
test
.ini.yidian-inc.com"
,
'development'
:
"http://bp-
dev
.ini.yidian-inc.com"
,
'test'
:
"http://bp-test.ini.yidian-inc.com"
,
'test'
:
"http://bp-test.ini.yidian-inc.com"
,
'production'
:
"http://bp-test.go2yd.com"
'production'
:
"http://bp-test.go2yd.com"
}
}
...
...
server/controllers/utils.js
View file @
2ddec0d6
...
@@ -9,8 +9,8 @@ exports.getUserPermission = async (ctx) => {
...
@@ -9,8 +9,8 @@ exports.getUserPermission = async (ctx) => {
url
,
url
,
method
:
"GET"
,
method
:
"GET"
,
qs
:
{
qs
:
{
user_email
:
"jianghaiming@126.com"
//
user_email: "jianghaiming@126.com"
//
user_email: user
user_email
:
user
}
}
};
};
return
await
req
(
ctx
,
opts
);
return
await
req
(
ctx
,
opts
);
...
...
src/main.js
View file @
2ddec0d6
...
@@ -15,7 +15,10 @@ import { redirectToLogin } from "./utils/util";
...
@@ -15,7 +15,10 @@ import { redirectToLogin } from "./utils/util";
// 处理路由权限
// 处理路由权限
router
.
beforeResolve
(
async
(
to
,
from
,
next
)
=>
{
router
.
beforeResolve
(
async
(
to
,
from
,
next
)
=>
{
if
(
!
to
.
meta
.
requireAuth
)
next
();
if
(
!
to
.
meta
.
requireAuth
)
{
next
();
return
true
;
}
if
(
!
store
.
state
.
permissions
)
{
if
(
!
store
.
state
.
permissions
)
{
const
{
status
,
user
}
=
await
fetchCurrentUser
();
const
{
status
,
user
}
=
await
fetchCurrentUser
();
...
...
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