This commit is contained in:
JiayuWang(王嘉宇) 2026-05-28 17:40:00 -04:00 committed by GitHub
commit 0411082670
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 27 additions and 1 deletions

View File

@ -13,4 +13,12 @@ ZEP_API_KEY=your_zep_api_key_here
# 注意如果不使用加速配置env文件中就不要出现下面的配置项
LLM_BOOST_API_KEY=your_api_key_here
LLM_BOOST_BASE_URL=your_base_url_here
LLM_BOOST_MODEL_NAME=your_model_name_here
LLM_BOOST_MODEL_NAME=your_model_name_here
# ===== 前端部署配置 =====
# 仅在使用源码部署并从非本机访问时需要设置
# 对于远程服务器/VPS部署必须设置为后端实际可访问的地址
# 示例VITE_API_BASE_URL=http://你的服务器IP:5001
# 本地开发时默认使用 http://localhost:5001无需设置
# 注意Vite开发服务器的代理配置(/api)仅在本地开发时有效production构建后需设置此变量
VITE_API_BASE_URL=http://localhost:5001

View File

@ -155,6 +155,15 @@ npm run dev
- 前端:`http://localhost:3000`
- 后端 API`http://localhost:5001`
> **远程部署说明:** 如果您从不同于运行MiroFish的机器例如在VPS上访问MiroFish您必须在构建前端之前设置 `VITE_API_BASE_URL` 环境变量为您的服务器IP或域名。否则前端会尝试连接浏览器本机的 `localhost:5001` 而不是服务器。
>
> ```bash
> # 远程部署示例
> VITE_API_BASE_URL=http://你的服务器IP:5001 npm run build
> ```
>
> Vite开发服务器的代理配置`/api` → `http://localhost:5001`)仅在本地开发模式下有效,在生产环境构建后需要设置此变量。
**单独启动:**
```bash

View File

@ -155,6 +155,15 @@ npm run dev
- Frontend: `http://localhost:3000`
- Backend API: `http://localhost:5001`
> **Remote/VPS Deployment Note:** If you are accessing MiroFish from a different machine than where it's running (e.g., on a VPS), you must set the `VITE_API_BASE_URL` environment variable to your server's IP or domain before building the frontend. Without this, the frontend will try to connect to `localhost:5001` on the *browser's* machine instead of the server.
>
> ```bash
> # Example for remote deployment
> VITE_API_BASE_URL=http://YOUR_SERVER_IP:5001 npm run build
> ```
>
> The Vite dev server proxy (`/api` → `http://localhost:5001`) only works in local development mode, not in production builds.
**Start Individually:**
```bash