feat: 适配 Nginx /ai/ 路径前缀
Some checks failed
构建并部署 AI Agent 服务 / deploy (push) Failing after 1m25s

This commit is contained in:
2026-04-14 02:37:42 +08:00
parent 58b424982a
commit 8eccec3fb8
3 changed files with 4 additions and 4 deletions

View File

@@ -12,4 +12,4 @@ ENV PYTHONPATH=/app
EXPOSE 8501
CMD ["streamlit", "run", "frontend/frontend.py", "--server.port", "8501", "--server.address", "0.0.0.0"]
CMD ["streamlit", "run", "frontend/frontend.py", "--server.port", "8501", "--server.address", "0.0.0.0", "--server.baseUrlPath", "/ai"]

View File

@@ -46,7 +46,7 @@ services:
dockerfile: docker/Dockerfile.frontend
container_name: ai-frontend
environment:
- API_URL=/api/chat # 通过 Nginx 反向代理访问后端
- API_URL=/ai/api/chat # 通过 Nginx 反向代理访问后端(路径前缀 /ai
ports:
- "127.0.0.1:8501:8501" # 仅本机访问,供 Nginx 反向代理使用
networks: