feat: 龙虾记忆同步系统完整版本
功能特性: - 文件树展示 - 差异对比 - 双向同步(本地 <-> 数据库) - 版本历史追踪 - 统计信息展示 核心补丁: 1. 分块读取与流式传输(防止大文件内存飙升) 2. .lobsterignore 机制(排除临时文件) 3. 操作溯源(Audit Log,记录同步历史) 技术栈: - 后端: Django + DRF + PostgreSQL - 前端: React + Ant Design - 部署: Docker + Docker Compose 项目已完整部署,可直接使用 docker-compose up -d 启动
This commit is contained in:
65
docker-compose.yml
Normal file
65
docker-compose.yml
Normal file
@@ -0,0 +1,65 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
# PostgreSQL 数据库
|
||||
postgres:
|
||||
image: postgres:15-alpine
|
||||
container_name: lobster-postgres
|
||||
environment:
|
||||
POSTGRES_DB: lobster_memory
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: postgres
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
ports:
|
||||
- "5432:5432"
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
# Django 后端
|
||||
backend:
|
||||
build:
|
||||
context: ./backend
|
||||
dockerfile: Dockerfile
|
||||
container_name: lobster-backend
|
||||
environment:
|
||||
DB_HOST: postgres
|
||||
DB_NAME: lobster_memory
|
||||
DB_USER: postgres
|
||||
DB_PASSWORD: postgres
|
||||
DB_PORT: 5432
|
||||
LOBSTER_MEMORY_BASE: /app/memory_files
|
||||
volumes:
|
||||
# 挂载龙虾记忆目录
|
||||
- /home/node/.openclaw/workspace/daotong:/app/memory_files:ro
|
||||
# 代码热重载(开发用)
|
||||
- ./backend:/app
|
||||
ports:
|
||||
- "8087:8087"
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
command: >
|
||||
sh -c "
|
||||
python manage.py migrate &&
|
||||
python manage.py runserver 0.0.0.0:8087
|
||||
"
|
||||
|
||||
# React 前端
|
||||
frontend:
|
||||
build:
|
||||
context: ./frontend
|
||||
dockerfile: Dockerfile
|
||||
container_name: lobster-frontend
|
||||
ports:
|
||||
- "8086:80"
|
||||
environment:
|
||||
- REACT_APP_API_URL=http://localhost:8087/api
|
||||
depends_on:
|
||||
- backend
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
Reference in New Issue
Block a user