@h-ai/cli 0.1.0-alpha.50 → 0.1.0-alpha.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +52 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/templates/apps/api/.dockerignore.hbs +14 -0
- package/templates/apps/api/Dockerfile.hbs +34 -0
- package/templates/apps/api/apps/{{projectName}}-service/README.md.hbs +6 -0
- package/templates/apps/api/apps/{{projectName}}-service/config/_core.yml.hbs +2 -2
- package/templates/apps/api/apps/{{projectName}}-service/config/_serv.yml.hbs +4 -4
- package/templates/apps/api/apps/{{projectName}}-service/package.json.hbs +2 -0
- package/templates/apps/api/package.json.hbs +4 -0
- package/templates/apps/fullstack/.dockerignore.hbs +14 -0
- package/templates/apps/fullstack/Dockerfile.hbs +71 -0
- package/templates/apps/fullstack/docker/fullstack-server.mjs.hbs +194 -0
- package/templates/apps/fullstack/docker/nginx.conf.hbs +18 -0
- package/templates/apps/fullstack/package.json.hbs +8 -0
- package/templates/apps/fullstack/packages/{{projectName}}-serv/README.md.hbs +7 -0
- package/templates/apps/fullstack/packages/{{projectName}}-serv/config/_core.yml.hbs +2 -2
- package/templates/apps/fullstack/packages/{{projectName}}-serv/config/_serv.yml.hbs +3 -3
- package/templates/apps/fullstack/packages/{{projectName}}-serv/package.json.hbs +6 -0
- package/templates/apps/fullstack/packages/{{projectName}}-shared/src/lib/api/api-client.ts.hbs +2 -1
- package/templates/base/.dockerignore.hbs +17 -0
- package/templates/base/Dockerfile.hbs +56 -0
- package/templates/base/docker/nginx.conf.hbs +18 -0
- package/templates/base/package.json.hbs +16 -6
- package/templates/base/svelte.config.js.hbs +0 -8
- package/templates/skills/hai-app-create/SKILL.md +13 -0
|
@@ -354,6 +354,18 @@ core.init() → reldb.init() → cache.init() → iam.init() → createBusinessT
|
|
|
354
354
|
|
|
355
355
|
---
|
|
356
356
|
|
|
357
|
+
## 容器交付
|
|
358
|
+
|
|
359
|
+
- 保持脚手架根目录 `Dockerfile`、`.dockerignore` 与 `package.json` 中 `docker:build*` / `podman:build*` 命令同步。
|
|
360
|
+
- Podman 多阶段构建保持 `--format docker --jobs=1`;前者保留 `HEALTHCHECK`,后者避免部分 Podman 5.8/Buildah 组合在并行 stage 构建时触发内部 semaphore panic。
|
|
361
|
+
- SvelteKit 服务使用 Node adapter;纯 Vite 前端使用带 SPA fallback 的静态镜像;fullstack 默认支持 Web + Service 同源镜像。
|
|
362
|
+
- 配置文件随镜像提供,并允许只读挂载覆盖;密钥只通过环境变量或 `--env-file` 注入。
|
|
363
|
+
- 普通构建不携带 `data/`;只有用户明确运行 `docker:build:data` / `podman:build:data` 时才通过 named build context 嵌入 SQLite/本地存储初始快照。
|
|
364
|
+
- 数据库和本地存储的持续写入必须落到 volume,不能依赖镜像可写层。
|
|
365
|
+
- 完成前实际启动镜像,验证健康端点、非 root 用户、环境变量覆盖、配置挂载和预置数据读取。
|
|
366
|
+
|
|
367
|
+
---
|
|
368
|
+
|
|
357
369
|
## 检查清单
|
|
358
370
|
|
|
359
371
|
- [ ] **TDD 流程已执行**:先写测试 → 确认失败 → 再实现 → 确认通过
|
|
@@ -365,6 +377,7 @@ core.init() → reldb.init() → cache.init() → iam.init() → createBusinessT
|
|
|
365
377
|
- [ ] 日志级别正确(读 debug / 写 debug+info / 失败 warn|error)
|
|
366
378
|
- [ ] 禁止 `console.log`、`any`、硬编码密钥
|
|
367
379
|
- [ ] 用户可见文本走 i18n
|
|
380
|
+
- [ ] Docker / Podman 镜像可启动,配置/环境变量/数据目录行为已验证
|
|
368
381
|
- [ ] 新增表有索引定义
|
|
369
382
|
- [ ] 组件优先使用 `@h-ai/ui`
|
|
370
383
|
- [ ] `pnpm typecheck && pnpm lint && pnpm test` 通过
|