From 9782b2f1e8cccea0dedf4b61eb6af28db68c672a Mon Sep 17 00:00:00 2001 From: XinWei <2718030729@qq.com> Date: Mon, 28 Oct 2024 16:12:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9E=84=E5=BB=BA=E9=A1=BA=E5=BA=8F=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ludu-job-admin/ludu-job-admin-biz/run.sh | 12 ++++++------ .../ludu-module-datacenter-biz/run.sh | 13 ++++++------- ludu-module-parking/ludu-module-parking-biz/run.sh | 13 ++++++------- .../ludu-module-ticketing-biz/run.sh | 13 ++++++------- yudao-gateway/run.sh | 13 ++++++------- yudao-module-infra/yudao-module-infra-biz/run.sh | 13 ++++++------- yudao-module-system/yudao-module-system-biz/run.sh | 13 ++++++------- 7 files changed, 42 insertions(+), 48 deletions(-) diff --git a/ludu-job-admin/ludu-job-admin-biz/run.sh b/ludu-job-admin/ludu-job-admin-biz/run.sh index be7481089..468d26fa8 100644 --- a/ludu-job-admin/ludu-job-admin-biz/run.sh +++ b/ludu-job-admin/ludu-job-admin-biz/run.sh @@ -3,14 +3,14 @@ app_name='ludu-job-admin' app_version='1.0.0' # 定义应用环境 #profile_active='prod' +# 打包编译docker镜像 +echo '----build image----' +docker buildx build -f Dockerfile -t ${app_name}:${app_version} . echo '----stop container----' docker stop ${app_name} echo '----rm container----' docker rm ${app_name} -echo '----rm image----' -docker rmi ${app_name}:${app_version} -# 打包编译docker镜像 -echo '----build image----' -docker buildx build -f Dockerfile -t ${app_name}:${app_version} . +echo '----rmi none image----' +docker rmi $(docker images -f "dangling=true" -q) echo '----start container----' -docker run -d -p 48084:9090 --name ${app_name} --memory 512m ${app_name}:${app_version} \ No newline at end of file +docker run -d -p 48082:9090 --name ${app_name} --restart always ${app_name}:${app_version} \ No newline at end of file diff --git a/ludu-module-datacenter/ludu-module-datacenter-biz/run.sh b/ludu-module-datacenter/ludu-module-datacenter-biz/run.sh index 82c06a65e..44c011f2a 100644 --- a/ludu-module-datacenter/ludu-module-datacenter-biz/run.sh +++ b/ludu-module-datacenter/ludu-module-datacenter-biz/run.sh @@ -2,15 +2,14 @@ app_name='ludu-module-datacenter' # 定义应用版本 app_version='1.0.0' # 定义应用环境 -#profile_active='prod' +# 打包编译docker镜像 +echo '----build image----' +docker buildx build -f Dockerfile -t ${app_name}:${app_version} . echo '----stop container----' docker stop ${app_name} echo '----rm container----' docker rm ${app_name} -echo '----rm image----' -docker rmi ${app_name}:${app_version} -# 打包编译docker镜像 -echo '----build image----' -docker buildx build -f Dockerfile -t ${app_name}:${app_version} . +echo '----rmi none image----' +docker rmi $(docker images -f "dangling=true" -q) echo '----start container----' -docker run -d -p 48092:48092 --name ${app_name} ${app_name}:${app_version} \ No newline at end of file +docker run -d -p 48092:48092 --name ${app_name} --restart always ${app_name}:${app_version} \ No newline at end of file diff --git a/ludu-module-parking/ludu-module-parking-biz/run.sh b/ludu-module-parking/ludu-module-parking-biz/run.sh index 4345a8ef6..c7612019f 100644 --- a/ludu-module-parking/ludu-module-parking-biz/run.sh +++ b/ludu-module-parking/ludu-module-parking-biz/run.sh @@ -2,15 +2,14 @@ app_name='ludu-module-parking' # 定义应用版本 app_version='1.0.0' # 定义应用环境 -#profile_active='prod' +# 打包编译docker镜像 +echo '----build image----' +docker buildx build -f Dockerfile -t ${app_name}:${app_version} . echo '----stop container----' docker stop ${app_name} echo '----rm container----' docker rm ${app_name} -echo '----rm image----' -docker rmi ${app_name}:${app_version} -# 打包编译docker镜像 -echo '----build image----' -docker buildx build -f Dockerfile -t ${app_name}:${app_version} . +echo '----rmi none image----' +docker rmi $(docker images -f "dangling=true" -q) echo '----start container----' -docker run -d -p 48090:48090 --name ${app_name} --memory 800m ${app_name}:${app_version} \ No newline at end of file +docker run -d -p 48090:48090 --name ${app_name} --restart always ${app_name}:${app_version} \ No newline at end of file diff --git a/ludu-module-ticketing/ludu-module-ticketing-biz/run.sh b/ludu-module-ticketing/ludu-module-ticketing-biz/run.sh index 6c82a8a50..7ea08fc77 100644 --- a/ludu-module-ticketing/ludu-module-ticketing-biz/run.sh +++ b/ludu-module-ticketing/ludu-module-ticketing-biz/run.sh @@ -2,15 +2,14 @@ app_name='ludu-module-ticketing' # 定义应用版本 app_version='1.0.0' # 定义应用环境 -#profile_active='prod' +# 打包编译docker镜像 +echo '----build image----' +docker buildx build -f Dockerfile -t ${app_name}:${app_version} . echo '----stop container----' docker stop ${app_name} echo '----rm container----' docker rm ${app_name} -echo '----rm image----' -docker rmi ${app_name}:${app_version} -# 打包编译docker镜像 -echo '----build image----' -docker buildx build -f Dockerfile -t ${app_name}:${app_version} . +echo '----rmi none image----' +docker rmi $(docker images -f "dangling=true" -q) echo '----start container----' -docker run -d -p 48088:48088 --name ${app_name} --memory 800m ${app_name}:${app_version} \ No newline at end of file +docker run -d -p 48088:48088 --name ${app_name} --restart always ${app_name}:${app_version} \ No newline at end of file diff --git a/yudao-gateway/run.sh b/yudao-gateway/run.sh index ded2b142b..bd7d3d417 100644 --- a/yudao-gateway/run.sh +++ b/yudao-gateway/run.sh @@ -2,15 +2,14 @@ app_name='yudao-gateway' # 定义应用版本 app_version='1.0.0' # 定义应用环境 -#profile_active='prod' +# 打包编译docker镜像 +echo '----build image----' +docker buildx build -f Dockerfile -t ${app_name}:${app_version} . echo '----stop container----' docker stop ${app_name} echo '----rm container----' docker rm ${app_name} -echo '----rm image----' -docker rmi ${app_name}:${app_version} -# 打包编译docker镜像 -echo '----build image----' -docker buildx build -f Dockerfile -t ${app_name}:${app_version} . +echo '----rmi none image----' +docker rmi $(docker images -f "dangling=true" -q) echo '----start container----' -docker run -d -p 48083:48080 --name ${app_name} --memory 512m ${app_name}:${app_version} \ No newline at end of file +docker run -d -p 48081:48080 --name ${app_name} --restart always ${app_name}:${app_version} \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-biz/run.sh b/yudao-module-infra/yudao-module-infra-biz/run.sh index 98c574ec0..9f852f4f8 100644 --- a/yudao-module-infra/yudao-module-infra-biz/run.sh +++ b/yudao-module-infra/yudao-module-infra-biz/run.sh @@ -2,15 +2,14 @@ app_name='yudao-module-infra' # 定义应用版本 app_version='1.0.0' # 定义应用环境 -#profile_active='prod' +# 打包编译docker镜像 +echo '----build image----' +docker buildx build -f Dockerfile -t ${app_name}:${app_version} . echo '----stop container----' docker stop ${app_name} echo '----rm container----' docker rm ${app_name} -echo '----rm image----' -docker rmi ${app_name}:${app_version} -# 打包编译docker镜像 -echo '----build image----' -docker buildx build -f Dockerfile -t ${app_name}:${app_version} . +echo '----rmi none image----' +docker rmi $(docker images -f "dangling=true" -q) echo '----start container----' -docker run -d -p 48082:48082 --name ${app_name} ${app_name}:${app_version} \ No newline at end of file +docker run -d -p 48182:48082 --name ${app_name} --restart always ${app_name}:${app_version} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/run.sh b/yudao-module-system/yudao-module-system-biz/run.sh index 1cf5b11a0..c6f56549c 100644 --- a/yudao-module-system/yudao-module-system-biz/run.sh +++ b/yudao-module-system/yudao-module-system-biz/run.sh @@ -2,15 +2,14 @@ app_name='yudao-module-system' # 定义应用版本 app_version='1.0.0' # 定义应用环境 -#profile_active='prod' +# 打包编译docker镜像 +echo '----build image----' +docker buildx build -f Dockerfile -t ${app_name}:${app_version} . echo '----stop container----' docker stop ${app_name} echo '----rm container----' docker rm ${app_name} -echo '----rm image----' -docker rmi ${app_name}:${app_version} -# 打包编译docker镜像 -echo '----build image----' -docker buildx build -f Dockerfile -t ${app_name}:${app_version} . +echo '----rmi none image----' +docker rmi $(docker images -f "dangling=true" -q) echo '----start container----' -docker run -d -p 48081:48081 --name ${app_name} --memory 750m ${app_name}:${app_version} \ No newline at end of file +docker run -d -p 48181:48081 --name ${app_name} --restart always ${app_name}:${app_version} \ No newline at end of file