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
b7df043d
Commit
b7df043d
authored
Aug 23, 2021
by
gengshaojing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: 预览环境配置
parent
a8a1ffdf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
4 deletions
+23
-4
deploy-config-pre.sh
deploy/deploy_configs/deploy-config-pre.sh
+3
-3
start.sh
deploy/start_env/op-web-service/start.sh
+1
-1
pm2-pre.json
pm2-pre.json
+19
-0
No files found.
deploy/deploy_configs/deploy-config-pre.sh
View file @
b7df043d
...
@@ -2,13 +2,13 @@
...
@@ -2,13 +2,13 @@
QA_PRE_START_CMD
=
""
#用于测试环境在START_CMDS执行之前执行,一般用来去掉服务启动时候的内存要求。
QA_PRE_START_CMD
=
""
#用于测试环境在START_CMDS执行之前执行,一般用来去掉服务启动时候的内存要求。
START_CMDS
=
"cd /home/services/ ;sh deploy.sh
${
TARGET_ENV
}
${
TARGET_PORT
}
"
#进入docker container以后的服务启动命令
START_CMDS
=
"cd /home/services/ ;sh deploy.sh
${
TARGET_ENV
}
"
#进入docker container以后的服务启动命令
DOCKER_PORT_MAPS
=
"
${
TARGET_PORT
}
:
${
TARGET_PORT
}
"
#宿>主机端口:container内部端口的映射关系
DOCKER_PORT_MAPS
=
"
8090:8090
"
#宿>主机端口: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
=
"
${
TARGET_PORT
}
"
#服务的端口
SERVICE_PORT
=
"
8090
"
#服务的端口
DONT_CHECK_PORT
=
'true'
#如果服务不启动端口,那么这个设置为false
DONT_CHECK_PORT
=
'true'
#如果服务不启动端口,那么这个设置为false
#只用于线上部署,服务降级命令(纯字符串,使用单括号),如果部署时downgrade_flag设置成true, 则在部署完成后,enable haproxy之前,在部署的container内部执行这个命令
#只用于线上部署,服务降级命令(纯字符串,使用单括号),如果部署时downgrade_flag设置成true, 则在部署完成后,enable haproxy之前,在部署的container内部执行这个命令
...
...
deploy/start_env/op-web-service/start.sh
View file @
b7df043d
...
@@ -15,7 +15,7 @@ if [ X"$env" == X"prod" ];then
...
@@ -15,7 +15,7 @@ if [ X"$env" == X"prod" ];then
echo
"{
\"
pm2-logrotate
\"
:{
\"
max_size
\"
:
\"
524288000
\"
,
\"
interval
\"
:
\"
7
\"
,
\"
retain
\"
:
\"
10
\"
},
\"
module-db
\"
:{
\"
pm2-logrotate
\"
:true}}"
>
/root/.pm2/module_conf.json
echo
"{
\"
pm2-logrotate
\"
:{
\"
max_size
\"
:
\"
524288000
\"
,
\"
interval
\"
:
\"
7
\"
,
\"
retain
\"
:
\"
10
\"
},
\"
module-db
\"
:{
\"
pm2-logrotate
\"
:true}}"
>
/root/.pm2/module_conf.json
pm2 start pm2.json
pm2 start pm2.json
elif
[
X
"
$env
"
==
X
"preprod"
]
;
then
elif
[
X
"
$env
"
==
X
"preprod"
]
;
then
PORT
=
$port
NODE_ENV
=
"prod"
pm2 start app.js
--name
'opwebservice'
--watch
pm2 start pm2-pre.json
else
else
PORT
=
$port
NODE_ENV
=
$env
pm2 start app.js
--name
'opwebservice'
--watch
PORT
=
$port
NODE_ENV
=
$env
pm2 start app.js
--name
'opwebservice'
--watch
fi
fi
...
...
pm2-pre.json
0 → 100644
View file @
b7df043d
{
"apps"
:
[
{
"name"
:
"opwebservice"
,
"script"
:
"app.js"
,
"log_date_format"
:
"YYYY-MM-DD HH:mm Z"
,
"cwd"
:
"/home/services/op-web-service/htdocs"
,
"exec_mode"
:
"cluster"
,
"instances"
:
0
,
"error_file"
:
"/home/services/op-web-service/logs/opwebservice.err.log"
,
"out_file"
:
"/home/services/op-web-service/logs/opwebservice.out.log"
,
"max_memory_restart"
:
"1G"
,
"env"
:
{
"NODE_ENV"
:
"production"
,
"PORT"
:
"8090"
}
}
]
}
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