# =========================================== # AI4Write Docker Environment Configuration # =========================================== # 复制此文件为 .env 并根据实际环境修改配置值 # 所有基础服务(PostgreSQL、MinIO、Redis)使用外部服务 # 使用 host.docker.internal 可连接宿主机上的服务 # Node Environment NODE_ENV=production # =========================================== # PostgreSQL Configuration (外部服务) # =========================================== # 示例:连接宿主机PostgreSQL POSTGRES_HOST=host.docker.internal # 示例:连接远程PostgreSQL # POSTGRES_HOST=192.168.1.100 POSTGRES_PORT=5432 POSTGRES_USER=ai4write POSTGRES_PASSWORD=your-secure-password-here POSTGRES_DB=kb # =========================================== # MinIO Object Storage Configuration (外部服务) # =========================================== # 示例:连接宿主机MinIO MINIO_ENDPOINT=host.docker.internal # 示例:连接远程MinIO # MINIO_ENDPOINT=minio.example.com MINIO_PORT=9000 MINIO_USE_SSL=false MINIO_ACCESS_KEY=minioadmin MINIO_SECRET_KEY=your-minio-secret-key MINIO_BUCKET=ai4write # =========================================== # Redis Configuration (外部服务) # =========================================== # 示例:连接宿主机Redis REDIS_HOST=host.docker.internal # 示例:连接远程Redis # REDIS_HOST=redis.example.com REDIS_PORT=6379 # =========================================== # BGE-M3 Embedding API Configuration # =========================================== EMBEDDING_API_URL=http://your-embedding-host:1234/v1/embeddings EMBEDDING_MODEL=text-embedding-bge-m3 # =========================================== # Document Chunking Configuration (文档分块配置) # =========================================== # 单块最大字符数(默认1500,增大可保留更多上下文) CHUNK_SIZE=1500 # 块之间的重叠字符数(默认150) CHUNK_OVERLAP=150 # 向量化批处理大小(每批处理的分块数量,默认5) EMBEDDING_BATCH_SIZE=5 # 批次之间的延迟毫秒数(防止请求过快,默认500) EMBEDDING_BATCH_DELAY=500 # =========================================== # DeepSeek/vLLM LLM Configuration # =========================================== DEEPSEEK_BASE_URL=https://api.deepseek.com DEEPSEEK_API_KEY=your-deepseek-api-key DEEPSEEK_MODEL=deepseek-chat # =========================================== # JWT Authentication Configuration # =========================================== JWT_SECRET=your-super-secret-jwt-key-change-in-production JWT_EXPIRES_IN=7d # =========================================== # Service Ports Configuration # =========================================== BACKEND_PORT=3001 FRONTEND_PORT=3000 # =========================================== # Frontend Configuration # =========================================== NUXT_PUBLIC_API_BASE_URL=http://localhost:3001