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"