Files
project57-x/README.md
T
mdszxy 74dd730e19
CI Pipeline / check-commit (push) Successful in 5s
CI Pipeline / deploy-only (push) Has been skipped
CI Pipeline / build (push) Successful in 20s
CI Pipeline / deploy (push) Successful in 17s
fix: proxy admin via A public host, ClusterIP port 80 refused [deploy]
2026-10-06 00:30:08 +08:00

44 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# project57-x
B 站宿主:浏览器只访问本站。A 站(project57)**不需要公网域名**。
- 页面从 **同源** 加载 `/embed/aurora.js`
- nginx(生产)或 Vite proxy(本地)把 `/embed`、`/images`、`/api/contact` 转到集群内 A 站
- 以后给 B 站绑域名即可,不用改前端
CI 对齐 project0:提交带 `[deploy]` 会构建镜像并部署。nginx 监听 **3000**,`/api/health` 给探针。
仓库 Secrets:`LFS_PAT`、`KUBECONFIG_BASE64`。
B 站会反代 A 站的前台与后台:
- 前台:`/embed`、`/images`、`/api/contact`
- 后台:`/admin`、`/_next`、`/api/*`(登录 cookie 留在 B 域名)
默认上游走 A 站公网(集群内 `project57-svc:80` 当前会 Connection refused):
```
A_UPSTREAM=https://project57.website-build.org
```
后台入口:`https://project57-x.website-build.org/admin/login`
## 本地运行
1. A 站打包并启动:
```bash
cd ../project57
pnpm build:embed
pnpm dev
```
2. 本仓库:
```bash
pnpm install
pnpm dev
```
默认 http://localhost:4173 ,并代理到 `http://localhost:3000`。A 站端口不同则改 `.env` 里的 `VITE_A_ORIGIN`。