优化:已知问题

This commit is contained in:
2025-07-22 13:27:07 +08:00
parent 2b5ff62ff0
commit 505afb8c0d
29 changed files with 2144 additions and 6 deletions

48
docker-compose.yml Normal file
View File

@@ -0,0 +1,48 @@
version: '3.8'
services:
web:
build:
context: .
dockerfile: Dockerfile
container_name: ai-chat-web
ports:
- "3000:80"
restart: unless-stopped
environment:
- TZ=Asia/Shanghai
volumes:
# 可选如果需要持久化nginx日志
- ./logs:/var/log/nginx
networks:
- ai-chat-network
labels:
- "traefik.enable=true"
- "traefik.http.routers.ai-chat.rule=Host(`localhost`)"
- "traefik.http.services.ai-chat.loadbalancer.server.port=80"
# 可选:如果需要反向代理
nginx-proxy:
image: nginx:alpine
container_name: ai-chat-proxy
ports:
- "80:80"
- "443:443"
volumes:
- ./proxy.conf:/etc/nginx/conf.d/default.conf
- ./ssl:/etc/nginx/ssl # SSL证书目录如果需要HTTPS
depends_on:
- web
restart: unless-stopped
networks:
- ai-chat-network
profiles:
- proxy # 使用profile控制是否启动代理
networks:
ai-chat-network:
driver: bridge
volumes:
logs:
driver: local