引入二级大纲功能,新增父子节点关系及子节点排序,同时调整API与UI以支持嵌套大纲管理
This commit is contained in:
34
Dockerfile
Normal file
34
Dockerfile
Normal file
@@ -0,0 +1,34 @@
|
||||
# ── 阶段一:构建前端 ──
|
||||
FROM node:20-alpine AS frontend-build
|
||||
|
||||
WORKDIR /app/frontend
|
||||
COPY frontend/package.json frontend/package-lock.json* ./
|
||||
RUN npm ci
|
||||
COPY frontend/ ./
|
||||
RUN npm run build-only
|
||||
|
||||
|
||||
# ── 阶段二:运行后端 + 服务前端静态文件 ──
|
||||
FROM python:3.12-slim
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# 安装 Python 依赖
|
||||
COPY backend/requirements.txt ./requirements.txt
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# 复制后端代码
|
||||
COPY backend/app ./app
|
||||
|
||||
# 复制前端构建产物到后端静态目录
|
||||
COPY --from=frontend-build /app/frontend/dist ./static
|
||||
|
||||
# 数据目录(SQLite 存储)
|
||||
RUN mkdir -p /app/data
|
||||
VOLUME /app/data
|
||||
|
||||
ENV NOVAL_DATA_DIR=/app/data
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
|
||||
Reference in New Issue
Block a user