114 lines
2.6 KiB
YAML
114 lines
2.6 KiB
YAML
services:
|
|
faiss:
|
|
build:
|
|
context: ../faiss
|
|
container_name: faiss-service
|
|
ports:
|
|
- "8451:8000"
|
|
volumes:
|
|
- ../faiss/indexes:/app/indexes # 持久化索引目录
|
|
- ../faiss/.env:/app/.env # 可选:挂载配置
|
|
restart: unless-stopped
|
|
environment:
|
|
- FAISS_DIM=1024
|
|
- APP_PORT=8000
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
container_name: ai-chat-redis
|
|
command:
|
|
- redis-server
|
|
- --save
|
|
- ""
|
|
- --appendonly
|
|
- "no"
|
|
ports:
|
|
- "8888:6379"
|
|
restart: unless-stopped
|
|
|
|
tokenizer:
|
|
build:
|
|
context: ../tokenizer
|
|
image: tokenizer:1.0.0
|
|
container_name: tokenizer
|
|
ports:
|
|
- "3002:3002"
|
|
restart: unless-stopped
|
|
|
|
sensitive-filter:
|
|
build:
|
|
context: ../keywords-filter
|
|
image: keywords-filter:1.0.0
|
|
container_name: sensitive-filter
|
|
volumes:
|
|
- ./configs/sensitive.yaml:/app/config.yaml:ro
|
|
- ./configs/sensitive-dict.txt:/app/dict.txt:ro
|
|
command:
|
|
- --config=/app/config.yaml
|
|
- --dict=/app/dict.txt
|
|
ports:
|
|
- "50053:50053"
|
|
restart: unless-stopped
|
|
|
|
keywords-filter:
|
|
build:
|
|
context: ../keywords-filter
|
|
image: keywords-filter:1.0.0
|
|
container_name: keywords-filter
|
|
volumes:
|
|
- ./configs/keywords.yaml:/app/config.yaml:ro
|
|
- ./configs/keywords-dict.txt:/app/dict.txt:ro
|
|
command:
|
|
- --config=/app/config.yaml
|
|
- --dict=/app/dict.txt
|
|
ports:
|
|
- "50054:50054"
|
|
restart: unless-stopped
|
|
|
|
ai-chat-service:
|
|
build:
|
|
context: ../ai-chat-service
|
|
image: ai-chat-service:1.0.0
|
|
container_name: ai-chat-service
|
|
env_file:
|
|
- .env
|
|
volumes:
|
|
- ./configs/ai-chat-service.yaml:/app/config.yaml:ro
|
|
ports:
|
|
- "50055:50055"
|
|
depends_on:
|
|
- faiss
|
|
- tokenizer
|
|
- sensitive-filter
|
|
- keywords-filter
|
|
healthcheck:
|
|
test: ["CMD", "grpc_health_probe", "-addr=:50055"]
|
|
interval: 15s
|
|
timeout: 5s
|
|
retries: 5
|
|
restart: unless-stopped
|
|
|
|
ai-chat-backend:
|
|
build:
|
|
context: ../ai-chat-backend
|
|
image: ai-chat-backend:1.0.0
|
|
container_name: ai-chat-backend
|
|
ports:
|
|
- "7080:7080"
|
|
volumes:
|
|
- ./configs/ai-chat-backend.yaml:/app/config.yaml:ro
|
|
depends_on:
|
|
- ai-chat-service
|
|
restart: unless-stopped
|
|
|
|
ai-chat-web:
|
|
build:
|
|
context: ../ai-chat-web
|
|
image: ai-chat-web:1.0.0
|
|
container_name: ai-chat-web
|
|
depends_on:
|
|
- ai-chat-backend
|
|
ports:
|
|
- "${FRONTEND_PORT:-1025}:80"
|
|
restart: unless-stopped
|