-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
59 lines (57 loc) · 1.6 KB
/
Copy pathdocker-compose.yml
File metadata and controls
59 lines (57 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
version: '3'
services:
essay-corrector:
build:
context: .
dockerfile: Dockerfile
image: biubush/essay-corrector:latest
container_name: essay-corrector
ports:
- "8329:8329"
volumes:
# 持久化存储数据库
- ./database:/app/database
# 持久化存储临时文件
- essay_corrector_temp:/tmp/essay_corrector_temp
# 提示词文件挂载 - 注意此文件可以包含复杂格式,系统已兼容
- ./prompts.txt:/app/prompts.txt
environment:
- HOST=0.0.0.0
- PORT=8329
- TEMP_FOLDER=/tmp/essay_corrector_temp
# 设置工作模式,可选值:production, development
- MODE=production
# 应用配置
# - DEBUG=False
# - DATABASE_URI=sqlite:///database/tasks.db
# AI相关配置
# - AI_API_KEY=your_api_key_here
# - AI_MODEL=deepseek-chat
# - PROMPTS_FILE=/app/prompts.txt
# 定时任务配置
# - CLEANUP_INTERVAL_HOURS=24
# 文本处理配置
# - MAX_CHARS_PER_PARAGRAPH=3000
# 并行处理配置
# - MAX_WORKERS=5
# 是否打印配置信息
# - PRINT_CONFIG=True
restart: unless-stopped
# 健康检查,确保容器正常运行
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8329/"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
# 资源限制(可选)
# deploy:
# resources:
# limits:
# cpus: '1'
# memory: 1G
# reservations:
# cpus: '0.5'
# memory: 512M
volumes:
essay_corrector_temp: