feat: 初始化 Apache Doris 智能问答系统前端
- 基于 Vue 3 + TypeScript + Vite 构建 - 实现 RAG 智能问答聊天界面,支持流式响应 - 支持 PDF 文档上传(最大 30MB)和解析 - 集成 marked + highlight.js 实现 Markdown 渲染与代码高亮 - 使用 Element Plus 构建 UI 组件 - 支持暗黑/明亮主题切换 - 配置 Docker + Nginx 多阶段构建
This commit is contained in:
+33
@@ -0,0 +1,33 @@
|
||||
# 构建阶段
|
||||
FROM node:22-alpine AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# 安装 pnpm
|
||||
RUN npm install -g pnpm
|
||||
|
||||
# 复制依赖文件
|
||||
COPY package.json pnpm-lock.yaml ./
|
||||
|
||||
# 安装依赖
|
||||
RUN pnpm install --frozen-lockfile
|
||||
|
||||
# 复制源代码
|
||||
COPY . .
|
||||
|
||||
# 构建应用
|
||||
RUN pnpm build
|
||||
|
||||
# 运行阶段
|
||||
FROM nginx:alpine
|
||||
|
||||
# 复制构建产物到 nginx
|
||||
COPY --from=builder /app/dist /usr/share/nginx/html
|
||||
|
||||
# 复制 nginx 配置
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
# 暴露端口
|
||||
EXPOSE 80
|
||||
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
Reference in New Issue
Block a user