Files
project57-x/README.md
T
mdszxy 8a28342a81
CI Pipeline / check-commit (push) Successful in 6s
CI Pipeline / deploy-only (push) Has been skipped
CI Pipeline / build (push) Successful in 22s
CI Pipeline / deploy (push) Successful in 19s
fix: proxy embed to A public host with correct Host/SNI [deploy]
2026-10-06 00:17:49 +08:00

43 lines
1.0 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`。
K8s 可设置环境变量覆盖 A 站地址(默认走 A 站公网域名,反代会带正确 Host/SNI):
```
A_UPSTREAM=https://project57.website-build.org
```
若改回集群内 Service,例如:
```
A_UPSTREAM=http://project57-deploy.ns-project57.svc.cluster.local:3000
```
## 本地运行
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`。