docs: 五站点上线域名映射(Cloudflare DNS + Nginx 反代)
This commit is contained in:
@@ -11,11 +11,11 @@
|
||||
```
|
||||
packages/core/ @aidir/core —— 底座库(页面组件体 / 业务模块 / 站点外壳工厂 / 种子与工具脚本)
|
||||
sites/
|
||||
├── ai-stack/ AI Stack — Classic 目录 → http://localhost:3001
|
||||
├── launchai/ LaunchAI — Product Hunt 式社区 → http://localhost:3002
|
||||
├── the-ai-ledger/ The AI Ledger — Editorial 媒体 → http://localhost:3003
|
||||
├── devai-tools/ DevAI.tools — 开发者垂直 → http://localhost:3004
|
||||
└── findai/ findai — 极简搜索 → http://localhost:3005
|
||||
├── ai-stack/ AI Stack — Classic 目录 → https://ai-stack.opentest.cc
|
||||
├── launchai/ LaunchAI — Product Hunt 式社区 → https://launchai.opentest.cc
|
||||
├── the-ai-ledger/ The AI Ledger — Editorial 媒体 → https://the-ai-ledger.opentest.cc
|
||||
├── devai-tools/ DevAI.tools — 开发者垂直 → https://devai-tools.opentest.cc
|
||||
└── findai/ findai — 极简搜索 → https://findai.opentest.cc
|
||||
docs/ 设计文档 + 交付报告
|
||||
```
|
||||
|
||||
|
||||
+15
-7
@@ -53,6 +53,9 @@ for s in ai-stack launchai the-ai-ledger devai-tools findai; do (cd sites/$s &&
|
||||
# 一键启动(或分别 cd sites/<name> && bun run start)
|
||||
bash packages/core/scripts/start-all-sites.sh
|
||||
|
||||
# 注意:构建期间数据库需在线,且不要同时运行站点(Next 构建 worker 会占满 PG 连接)
|
||||
# 注意:修改 .env 后需 rm -rf .next 再构建(Turbopack 构建缓存不感知 env 变化)
|
||||
|
||||
# 质量
|
||||
bun test packages/core/tests # 32 个单元测试
|
||||
bun run typecheck # core + 5 站全部 0 错误
|
||||
@@ -144,13 +147,18 @@ src/
|
||||
|
||||
## 四、五个网站验证结论(§41 / 最终要求)
|
||||
|
||||
| 网站 | 目录 | 端口 | 定位 | 首页形态 |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| AI Stack | sites/ai-stack | 3001 | 标准目录 | Hero 搜索 + Trending/分类/新工具/用例/合集/评论 |
|
||||
| LaunchAI | sites/launchai | 3002 | 产品社区 | 今日发布 Feed + 大投票块 + Leaderboard 侧栏 |
|
||||
| The AI Ledger | sites/the-ai-ledger | 3003 | AI 媒体 | Featured Story + 编辑精选 + 购买指南 + 社区引语 |
|
||||
| DevAI.tools | sites/devai-tools | 3004 | 开发者垂直 | 终端风 Hero + 工作流/用例/技术栈 |
|
||||
| findai | sites/findai | 3005 | 极简搜索 | 居中大搜索框 + 热门搜索 + Trending |
|
||||
| 网站 | 目录 | 线上地址 | 本地端口 | 定位 | 首页形态 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| AI Stack | sites/ai-stack | https://ai-stack.opentest.cc | 3001 | 标准目录 | Hero 搜索 + Trending/分类/新工具/用例/合集/评论 |
|
||||
| LaunchAI | sites/launchai | https://launchai.opentest.cc | 3002 | 产品社区 | 今日发布 Feed + 大投票块 + Leaderboard 侧栏 |
|
||||
| The AI Ledger | sites/the-ai-ledger | https://the-ai-ledger.opentest.cc | 3003 | AI 媒体 | Featured Story + 编辑精选 + 购买指南 + 社区引语 |
|
||||
| DevAI.tools | sites/devai-tools | https://devai-tools.opentest.cc | 3004 | 开发者垂直 | 终端风 Hero + 工作流/用例/技术栈 |
|
||||
| findai | sites/findai | https://findai.opentest.cc | 3005 | 极简搜索 | 居中大搜索框 + 热门搜索 + Trending |
|
||||
|
||||
**域名与部署**:五个子域名经 `ldns` 配置 Cloudflare DNS(Proxied)+ Nginx 反向代理
|
||||
(`/etc/nginx/conf.d/<site>.conf` → 127.0.0.1:300X);各站点 `.env.local` 的
|
||||
`NEXT_PUBLIC_APP_URL` / `BETTER_AUTH_URL` 指向各自 https 域名,
|
||||
canonical / sitemap / JSON-LD / OAuth 回调输出均为线上域名。
|
||||
|
||||
验证结果:**5 个网站是 5 个独立 Next.js 应用**(独立 package.json、独立 .next 构建、独立进程/端口),
|
||||
共享同一套 PostgreSQL / Better Auth / Admin(§42 验证标准)。站点间零 `if site === "xxx"` 分支;
|
||||
|
||||
Reference in New Issue
Block a user