From 85ee02c3b74456b3ac83b8652b25c35890fcad07 Mon Sep 17 00:00:00 2001 From: Olia Lisa Date: Tue, 21 Apr 2026 16:08:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0docker-compose=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/run.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/run.sh b/bin/run.sh index fe8fb1a..09eb479 100644 --- a/bin/run.sh +++ b/bin/run.sh @@ -2,14 +2,14 @@ run() { local script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" # 脚本文件夹绝对路径 + local compose_file="$script_dir/../docker-compose.yml" # 如果容器已经启动, 则先停止容器 - local compose_file="$script_dir/../docker-compose.yml" if docker-compose -f "$compose_file" ps | grep -q "Up"; then docker-compose -f "$compose_file" down fi # 启动docker容器 - docker-compose -f "$script_dir/../docker-compose.yml" up -d + docker-compose -f "$compose_file" up -d }