Commit 2ecbd028 authored by liwenhong's avatar liwenhong

Merge branch 'master' of https://git.yidian-inc.com:8021/bp/op-web-service...

Merge branch 'master' of https://git.yidian-inc.com:8021/bp/op-web-service into lwh/head-distribution
parents 01a616f8 fe7b1c46
......@@ -3,12 +3,12 @@
QA_PRE_START_CMD="" #用于测试环境在START_CMDS执行之前执行,一般用来去掉服务启动时候的内存要求。
START_CMDS="cd /home/services/ ;sh deploy.sh ${TARGET_ENV}" #进入docker container以后的服务启动命令
DOCKER_PORT_MAPS="8066:8055" #宿>主机端口:container内部端口的映射关系
DOCKER_PORT_MAPS="8090:8090" #宿>主机端口:container内部端口的映射关系
DOCKER_VOLUMN_MAPS="~/_logs/${COMPONENT}-${TARGET_ENV}:/home/services/op-web-service/logs" #宿主机目录和container内部的目录映射关系
DOCKER_RUN_OPTIONS="--net=host" #docker启动时候额外的特殊的启动参数
DOCKER_PRESTOP_CMD="" #停止容器之前,执行的一些清理操作
SERVICE_PORT="8066" #服务的端口
SERVICE_PORT="8090" #服务的端口
DONT_CHECK_PORT='true' #如果服务不启动端口,那么这个设置为false
#只用于线上部署,服务降级命令(纯字符串,使用单括号),如果部署时downgrade_flag设置成true, 则在部署完成后,enable haproxy之前,在部署的container内部执行这个命令
......
......@@ -4,7 +4,7 @@ SERVICE_DIR="op-web-service" # 修改为正确的服务的名称
tar zxf ./${SERVICE_DIR}/bin/${SERVICE_DIR}.tar.gz -C ${SERVICE_DIR}/htdocs
cd ${SERVICE_DIR}
sh ./start.sh $1 "8055"
sh ./start.sh $1 $2
......
......@@ -14,6 +14,8 @@ cd /home/services/op-web-service/htdocs/
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
pm2 start pm2.json
elif [ X"$env" == X"preprod" ];then
pm2 start pm2-pre.json
else
PORT=$port NODE_ENV=$env pm2 start app.js --name 'opwebservice' --watch
fi
......
{
"apps": [
{
"name": "opwebservice-preload",
"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-preload.err.log",
"out_file": "/home/services/op-web-service/logs/opwebservice-preload.out.log",
"max_memory_restart": "1G",
"env": {
"NODE_ENV": "production",
"PORT": "8090"
}
}
]
}
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 to comment