Files
project57-x/README.md
T
mdszxy fe18e608dc
CI Pipeline / check-commit (push) Successful in 7s
CI Pipeline / deploy-only (push) Has been skipped
CI Pipeline / build (push) Successful in 27s
CI Pipeline / deploy (push) Failing after 2s
feat: proxy embed assets to in-cluster project57 [deploy]
2026-10-05 17:42:36 +08:00

37 lines
938 B
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 站地址(默认已按 CI 命名规则写好):
```
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`。