feat: 完成龙虾记忆同步系统
后端: - Django + DRF - PostgreSQL 数据库 - 文件扫描服务 - 差异检查服务 - 完整 REST API 前端: - React + Ant Design - 文件树展示 - 差异对比 - API 客户端封装 部署: - Docker Compose - 后端 Dockerfile - 前端 Dockerfile - 一键启动脚本 功能: - 扫描龙虾记忆文件 - 检查文件差异 - 双向同步(本地 <-> 数据库) - 版本历史 - 统计信息
This commit is contained in:
29
frontend/Dockerfile
Normal file
29
frontend/Dockerfile
Normal file
@@ -0,0 +1,29 @@
|
||||
# React 前端 Dockerfile
|
||||
FROM node:18-alpine as builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# 复制 package.json
|
||||
COPY package.json package-lock.json* ./
|
||||
|
||||
# 安装依赖
|
||||
RUN npm ci
|
||||
|
||||
# 复制代码
|
||||
COPY . .
|
||||
|
||||
# 构建生产版本
|
||||
RUN npm run build
|
||||
|
||||
# 生产环境镜像
|
||||
FROM nginx:alpine
|
||||
|
||||
# 复制构建产物
|
||||
COPY --from=builder /app/build /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