This commit is contained in:
Olia Lisa
2026-01-11 16:20:20 +08:00
parent af2ca1e4f4
commit a97a5bc02a
2 changed files with 8 additions and 5 deletions
+6 -2
View File
@@ -23,11 +23,15 @@ run() {
bash "$script_dir/create_config.sh" # 创建配置
fi
# 如果容器已经启动, 则先停止容器
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
# 打印分享链接
bash "$script_dir/print_share_link.sh"
}
run # 启动容器