Files
project57-x/README.md
T
mdszxy 076e603c93
CI Pipeline / check-commit (push) Successful in 9s
CI Pipeline / build (push) Has been skipped
CI Pipeline / deploy-only (push) Has been skipped
CI Pipeline / deploy (push) Has been skipped
feat: add Vite host and Gitea CI for project57 embed
2026-10-05 15:27:42 +08:00

34 lines
968 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)打包的前台 SPA。
CI 对齐 **project0**(本地 `projectBase`):提交信息带 `[deploy]` 会构建镜像并部署到 K8s。
本仓是 Vite 静态站,构建产物为 `dist/`,Docker 用 nginx 监听 **3000**,并提供 `/api/health` 给探针。
仓库 Secrets 需配置(与 project0 相同,外加 A 站地址):
- `LFS_PAT`
- `KUBECONFIG_BASE64`
- `VITE_A_ORIGIN`:A 站线上源站,如 `https://swissicapital.net`
## 本地运行
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`。