frontend 兼容

This commit is contained in:
1iaan
2026-04-06 11:38:45 +08:00
parent f433490e0d
commit 94bdba930e
323 changed files with 49507 additions and 34744 deletions

124
ai-chat-stack/compose.yaml Normal file
View File

@@ -0,0 +1,124 @@
services:
mysql:
image: mysql:8.0
container_name: ai-chat-mysql
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: root
command:
- --default-authentication-plugin=mysql_native_password
volumes:
- /data/mysql:/var/lib/mysql
- /home/lian/share/aichat/init/create_db.sql:/docker-entrypoint-initdb.d/create_db.sql:ro
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "127.0.0.1", "-proot"]
interval: 15s
timeout: 5s
retries: 10
pgvector:
image: pgvector/pgvector:pg16
container_name: ai-chat-pgvector
restart: unless-stopped
environment:
POSTGRES_DB: ai_chat
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- "15432:5432"
volumes:
- /data/pgvector:/var/lib/postgresql/data
- /home/lian/share/aichat/init/pgvector-init.sql:/docker-entrypoint-initdb.d/pgvector-init.sql:ro
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:
- /home/lian/share/aichat/ai-chat-stack/configs/sensitive.yaml:/app/config.yaml:ro
- /home/lian/share/aichat/ai-chat-stack/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:
- /home/lian/share/aichat/ai-chat-stack/configs/keywords.yaml:/app/config.yaml:ro
- /home/lian/share/aichat/ai-chat-stack/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
dns:
- 223.5.5.5
- 119.29.29.29
- 8.8.8.8
volumes:
- /home/lian/share/aichat/ai-chat-stack/configs/ai-chat-service.yaml:/app/config.yaml:ro
extra_hosts:
- "host.docker.internal:host-gateway"
ports:
- "50055:50055"
depends_on:
- mysql
- tokenizer
- sensitive-filter
- keywords-filter
- pgvector
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
dns:
- 223.5.5.5
- 119.29.29.29
- 8.8.8.8
volumes:
- /home/lian/share/aichat/ai-chat-stack/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:
- "1025:80"
restart: unless-stopped