Commit 4aca8caf authored by junmeng huang's avatar junmeng huang
Browse files

fix: 修复生产环境登录问题 - API地址配置

主要修改:
1. 修改 .env.production - 使用相对路径 /api 替代域名
2. 更新 nginx-site.local.conf - 使用 Docker 网络容器名访问后端
3. 更新 .gitlab-ci.yml - web容器加入 tenpages-network 网络
4. 新增 nginx-site.production.conf - 生产环境专用配置
5. 新增 deploy-web-to-server.sh - 服务器部署脚本

问题原因:
- 前端配置使用了 api.tenpages.com 域名
- 该域名未配置/解析错误,导致 CORS 错误
- nginx代理使用 host.docker.internal,在 Linux 上不工作

解决方案:
- 前端使用相对路径 /api,由 nginx 代理到后端
- nginx 通过 Docker 网络使用容器名 tenpages-api:8080
- web容器加入 backend 所在的 tenpages-network 网络

🤖 Generated with [Claude Code](https://claude.com/claude-code

)

Co-Authored-By: default avatarClaude <noreply@anthropic.com>
parent f35d9574
Loading
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment