From 726989bb29a83edb5b953cbcfaa438d753fc85f6 Mon Sep 17 00:00:00 2001 From: pan <1029559041@qq.com> Date: Sun, 11 Oct 2020 03:16:56 +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 | 2 +- shell/initRisk | 4 +++- shell/updateRisk | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/run b/run index 001c7cb..8fae550 100644 --- a/run +++ b/run @@ -1,3 +1,3 @@ #!/bin/sh #创建运行容器 -docker run -dit --name test -p 3000:3000 -p 2233:2233 test:1.0 +docker run --name test -p 3000:3000 -p 2233:2233 test:1.0 diff --git a/shell/initRisk b/shell/initRisk index 1cebfe8..cbe0d7f 100644 --- a/shell/initRisk +++ b/shell/initRisk @@ -8,5 +8,7 @@ updateRisk RiskCloudMock updateRisk RiskCloudFontend #运行openresty /usr/local/openresty/nginx/sbin/nginx + jobs -tail -f \ No newline at end of file +#把自动部署服务端切换到前台进行,使容器不会停止运行 +fg %1 \ No newline at end of file diff --git a/shell/updateRisk b/shell/updateRisk index 73615ee..bff626c 100644 --- a/shell/updateRisk +++ b/shell/updateRisk @@ -31,5 +31,5 @@ function run(){ run $1 echo `pwd` -rm -f $1.pid +rm -f ../$1.pid echo "脚本运行完毕,删除$1.pid"