refactor(部署): 重构部署架构,使用本地代理服务器替代环境变量配置

- 删除 Dockerfile.dev 和 entrypoint.sh,简化开发环境配置
- 修改 Dockerfile 使用 node 基础镜像并添加代理服务器
- 新增 proxy-server.js 处理 API 请求代理
- 更新 nginx 配置指向本地代理服务
- 修改前端请求添加自定义 base URL 头支持
This commit is contained in:
史悦
2026-01-22 16:40:16 +08:00
parent 8eb5499ecc
commit 199dd8a9db
11 changed files with 114 additions and 85 deletions

View File

@@ -1,7 +1,7 @@
server {
listen 80;
server_name localhost;
root /usr/share/nginx/html;
root /app/dist;
index index.html;
location / {
@@ -9,16 +9,16 @@ server {
}
location /api/chat {
proxy_pass https://thinkflow.lz-t.top/chat/completions;
proxy_set_header Host thinkflow.lz-t.top;
proxy_pass http://localhost:3000/api/chat;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
location /api/image {
proxy_pass https://thinkflow.lz-t.top/images/generations;
proxy_set_header Host thinkflow.lz-t.top;
proxy_pass http://localhost:3000/api/image;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;