forked from rex-lam/Anti-FraudX
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
62 lines (52 loc) · 1.6 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
62 lines (52 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
60
61
# 开发环境配置
version: '3.8'
services:
ollama:
# 开发环境可能需要更频繁的重启
restart: "no"
# 开发环境日志
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
ai-antiscam-backend:
# 开发环境配置
restart: "no"
# 开发环境变量
environment:
- APP_ENV=development
- LOG_LEVEL=DEBUG
- PYTHONDONTWRITEBYTECODE=1
- RELOAD=true
- FORCE_GPU=${FORCE_GPU:-1} # 开发环境默认强制GPU
# 开发模式:挂载代码以支持热重载
volumes:
# 代码挂载(可读写,支持热重载)
- ./backend:/app/backend
- ./frontend:/app/frontend
- ./start_server.py:/app/start_server.py
# 开发数据持久化到本地
- ./backend/training_data:/app/backend/training_data
- ./backend/models:/app/backend/models
- ./backend/db:/app/backend/db
- ./backend/arms_race_data:/app/backend/arms_race_data
- ./backend/agent_versions:/app/backend/agent_versions
- ./backend/ab_test_results:/app/backend/ab_test_results
- ./backend/agents/backups:/app/backend/agents/backups
# 开发环境使用热重载启动
command: >
sh -c "
cd /app/backend &&
uvicorn main:app --host 0.0.0.0 --port 8000 --reload --log-level debug
"
# 开发环境日志
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
# 开发工具端口
ports:
- "8000:8000"
- "5678:5678" # Python debugger端口(如果需要)