From a25f51550261787ca2e594f7bee56734247df0df Mon Sep 17 00:00:00 2001 From: pan <1029559041@qq.com> Date: Sun, 11 Oct 2020 00:33:52 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0openresty?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- run | 3 +-- shell/initRisk | 7 +++---- shell/updateRisk | 11 +++-------- 3 files changed, 7 insertions(+), 14 deletions(-) diff --git a/run b/run index fd0821e..15efedd 100644 --- a/run +++ b/run @@ -1,4 +1,3 @@ #!/bin/sh #创建运行容器 - -docker run --name test -p 3000:3000 -p 2233:2233 -p 5000:5000 test:1.0 & +docker run -d --name test -p 3000:3000 -p 2233:2233 -p 5000:5000 test:1.0 diff --git a/shell/initRisk b/shell/initRisk index 2113dca..dd8142b 100644 --- a/shell/initRisk +++ b/shell/initRisk @@ -1,11 +1,10 @@ #!/bin/sh - +#运行自动部署服务端 +nohup node /app/RiskCloudRun/bin/www & #运行web服务端 updateRisk RiskCloudMock #运行web客户端 updateRisk RiskCloudFontend #运行openresty -/usr/local/openresty/nginx/sbin/nginx -#运行自动部署服务端 -node /app/RiskCloudRun/bin/www \ No newline at end of file +/usr/local/openresty/nginx/sbin/nginx \ No newline at end of file diff --git a/shell/updateRisk b/shell/updateRisk index 273143c..e9788cb 100644 --- a/shell/updateRisk +++ b/shell/updateRisk @@ -22,17 +22,12 @@ function run(){ if [ ! -e $1 ] then git clone git@gogs.kirito.cool:panqihua/$1.git - isUpdate=1 else - isUpdate=0 fi cd $1 && git reset --hard && git pull && yarn && chmod +x run.sh && killNode - if [ $isUpdate -eq 0 ] - then - url="http://127.0.0.1:3000/finsh?name=$1" - echo "成功回调地址:$url" - curl $url - fi + url="http://127.0.0.1:3000/finsh?name=$1" + echo "成功回调地址:$url" + curl $url } run $1