Commit d04e8485 by 黄南光

新建wiki-knowledge项目

1 parent f0b89fcb
......@@ -20,9 +20,6 @@ RUN grep -v -i "pywin32" requirements.txt > requirements_linux.txt && \
COPY . .
# 确保目录存在
RUN mkdir -p ware/raw ware/wiki/metadata logs
EXPOSE 8104
CMD ["python", "main.py"]
# 使用代理镜像源,解决国内直接拉取 Docker Hub 导致的 metadata 错误
FROM m.daocloud.io/docker.io/library/node:20-alpine AS builder
WORKDIR /app
# 安装依赖
COPY package.json package-lock.json* ./
RUN npm ci || npm install
# 复制源码
COPY . .
# 构建 Next.js 项目
RUN npm run build
# 使用代理镜像源
FROM m.daocloud.io/docker.io/library/node:20-alpine AS runner
WORKDIR /app
ENV NODE_ENV production
# 暴露端口
EXPOSE 3000
# Next.js standalone 模式通常更好,但如果没有配置 standalone,直接启动 npm run start 也可以
# 我们这里用最基础的 npm run start 方式兼容性最高
COPY --from=builder /app ./
CMD ["npm", "run", "start"]
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!