This commit is contained in:
2026-01-09 08:49:18 +08:00
parent f3f1609455
commit 4d228ba739
4 changed files with 52 additions and 11 deletions

View File

@@ -7,11 +7,12 @@ WORKDIR /app
RUN git clone https://github.com/ModelEngine-Group/deer-flow.git /deer-flow \
&& mv /deer-flow/web/* /app \
&& rm -rf /deer-flow
# Install dependencies based on the preferred package manager
RUN if [ -f yarn.lock ]; then yarn --frozen-lockfile; \
# 配置 npm 淘宝镜像并安装依赖
RUN npm config set registry https://registry.npmmirror.com && \
if [ -f yarn.lock ]; then yarn config set registry https://registry.npmmirror.com && yarn --frozen-lockfile; \
elif [ -f package-lock.json ]; then npm ci; \
elif [ -f pnpm-lock.yaml ]; then npm install -g pnpm && pnpm i; \
elif [ -f pnpm-lock.yaml ]; then npm install -g pnpm && pnpm config set registry https://registry.npmmirror.com && pnpm i; \
else echo "Lockfile not found." && exit 1; \
fi
@@ -34,9 +35,11 @@ COPY --from=deps /app/node_modules ./node_modules
ENV NEXT_TELEMETRY_DISABLED=1
RUN if [ -f yarn.lock ]; then SKIP_ENV_VALIDATION=1 yarn build; \
# 配置 npm 淘宝镜像
RUN npm config set registry https://registry.npmmirror.com && \
if [ -f yarn.lock ]; then yarn config set registry https://registry.npmmirror.com && SKIP_ENV_VALIDATION=1 yarn build; \
elif [ -f package-lock.json ]; then SKIP_ENV_VALIDATION=1 npm run build; \
elif [ -f pnpm-lock.yaml ]; then npm install -g pnpm && SKIP_ENV_VALIDATION=1 pnpm run build; \
elif [ -f pnpm-lock.yaml ]; then npm install -g pnpm && pnpm config set registry https://registry.npmmirror.com && SKIP_ENV_VALIDATION=1 pnpm run build; \
else echo "Lockfile not found." && exit 1; \
fi