Files
project57-x/README.md
T
mdszxy f717f1d481
CI Pipeline / check-commit (push) Successful in 8s
CI Pipeline / deploy-only (push) Has been skipped
CI Pipeline / build (push) Successful in 36s
CI Pipeline / deploy (push) Failing after 1s
feat: point production host at project57 embed JS [deploy]
2026-10-05 17:02:58 +08:00

37 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)打包的前台 SPA。
CI 对齐 **project0**(本地 `projectBase`):提交信息带 `[deploy]` 会构建镜像并部署到 K8s。
本仓是 Vite 静态站,构建产物为 `dist/`,Docker 用 nginx 监听 **3000**,并提供 `/api/health` 给探针。
仓库 Secrets 需配置(与 project0 相同,外加 A 站地址):
- `LFS_PAT`
- `KUBECONFIG_BASE64`
- `VITE_A_ORIGIN`(可选):覆盖 `.env.production` 里的 A 站地址
- 默认生产源站:`https://swissicapital.net`(加载 `/embed/aurora.js`)
A 站需已部署嵌入包(`pnpm build` 会先跑 `build:embed`)。
## 本地运行
1. A 站先打包嵌入脚本并启动:
```bash
cd ../project57
pnpm build:embed
pnpm dev
```
2. 本仓库安装并启动(默认 http://localhost:4173):
```bash
pnpm install
pnpm dev
```
3. 若 A 站端口不是 `3000`,复制 `.env.example` 为 `.env`,改 `VITE_A_ORIGIN`。
页面会加载 `${VITE_A_ORIGIN}/embed/aurora.js`,图片和联系表单也走 A 站。路由为 hash,例如 `http://localhost:4173/#/kontakt`。