-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcompose.dev.yml
More file actions
executable file
·41 lines (38 loc) · 989 Bytes
/
compose.dev.yml
File metadata and controls
executable file
·41 lines (38 loc) · 989 Bytes
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
services:
rag-app:
build:
context: .
dockerfile: Dockerfile
ports:
- "8501:8501"
volumes:
# 直接掛載整個項目目錄,支持熱重載
- .:/app
depends_on:
- ollama
networks:
- rag-network
# 開發環境啟用熱重載, 使用poll模式, 避免容器內監控檔案異常
# command: streamlit run app.py --server.port 8501 --server.address 0.0.0.0 --server.runOnSave true --server.fileWatcherType poll
tty: true
command: "sleep infinity"
# 設置用戶權限,支持 Git 操作
user: "0:0" # 使用 root 用戶,確保有足夠權限
ollama:
image: ollama/ollama:latest
ports:
- "11434:11434"
volumes:
- ./data/ollama:/root/.ollama
networks:
- rag-network
# 開發環境資源限制較寬鬆
deploy:
resources:
limits:
memory: 8G
reservations:
memory: 4G
networks:
rag-network:
driver: bridge