增加PDF解析能力和相关OSS配置

This commit is contained in:
wangbo 2026-01-21 23:44:33 +08:00
parent c092783c5a
commit 653d989cc4
4 changed files with 54 additions and 2 deletions

45
.env.tools Normal file
View File

@ -0,0 +1,45 @@
# ============================================
# OSS/S3 配置(可选)
# 如果不配置PDF解析功能仍可使用但图片不会上传到OSS
# ============================================
# S3兼容的OSS端点URL
# 示例:
# - AWS S3: https://s3.amazonaws.com
# - 阿里云OSS: https://oss-cn-hangzhou.aliyuncs.com
# - 腾讯云COS: https://cos.ap-beijing.myqcloud.com
# - MinIO: http://localhost:9000
OSS_ENDPOINT=
# OSS访问密钥IDAccess Key ID
OSS_ACCESS_KEY_ID=
# OSS访问密钥SecretAccess Key Secret
OSS_ACCESS_KEY_SECRET=
# OSS存储桶名称Bucket Name
OSS_BUCKET=
# OSS区域Region可选默认为us-east-1
# 示例:
# - AWS: us-east-1, eu-west-1
# - 阿里云: oss-cn-hangzhou, oss-cn-beijing
# - 腾讯云: ap-beijing, ap-shanghai
OSS_REGION=us-east-1
# 自定义域名可选如果设置将使用此域名返回文件URL
# 如果不设置,将使用 OSS_ENDPOINT
# 通常用于CDN加速域名
# 示例https://cdn.example.com
OSS_DOMAIN=
# ============================================
# 应用配置(可选)
# ============================================
# 应用端口默认8000
# PORT=8000
# 应用主机默认0.0.0.0
# HOST=0.0.0.0

View File

@ -188,4 +188,9 @@ cd easyai && docker-compose down && docker-compose up -d
apt remove docker-compose
#重新安装
./start.sh
```
```
4. 单独更新docker-compose.yml文件并更新
```bash
cd ~/easyai && cp docker-compose.yml docker-compose.yml.backup && wget -q https://git.51easyai.com/wangbo/easyai/raw/main/docker-compose.yml -O docker-compose.yml && echo "✅ docker-compose.yml 更新完成"
```

View File

@ -247,6 +247,8 @@ services:
- PYTHONUNBUFFERED=1
- OMP_NUM_THREADS=4
- OPENBLAS_NUM_THREADS=4
env_file:
- .env.tools
shm_size: 2g
restart: unless-stopped
networks:

View File

@ -61,7 +61,7 @@ server {
location /api/ {
proxy_pass http://127.0.0.1:3001/;
proxy_read_timeout 600s; # 您已设置,适合长连接
proxy_read_timeout 1200s; # 您已设置,适合长连接
client_max_body_size 100M;
proxy_redirect off;