fix:修复bug

This commit is contained in:
Daniel
2026-04-01 20:29:33 +08:00
parent afbcd99224
commit a80d2b8430
9 changed files with 477 additions and 179 deletions

View File

@@ -26,14 +26,26 @@ fi
export DOCKER_BUILDKIT=1
export COMPOSE_DOCKER_CLI_BUILD=1
find_free_port() {
local port="$1"
while lsof -nP -iTCP:"${port}" -sTCP:LISTEN >/dev/null 2>&1; do
port=$((port + 1))
done
echo "${port}"
}
HOST_PORT="$(find_free_port 5180)"
export HOST_PORT
echo "==> 使用国内镜像源构建并启动 VFXdemo"
echo " - Node 基础镜像: docker.m.daocloud.io"
echo " - npm registry: registry.npmmirror.com"
echo " - Host 端口: ${HOST_PORT}"
"${COMPOSE_CMD[@]}" build --pull
"${COMPOSE_CMD[@]}" up -d
echo
echo "启动完成: http://localhost:5180"
echo "启动完成: http://localhost:${HOST_PORT}"
echo "查看日志: ${COMPOSE_CMD[*]} logs -f"
echo "停止服务: ${COMPOSE_CMD[*]} down"