Document full production deploy (creds, Caddy, one-shot script).
Make AI/human redeploys repeatable via DEPLOY.md and npm run deploy. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
21
README.md
21
README.md
@@ -76,21 +76,13 @@ Without `meta.json`, the catalog still works from `VERSION.txt` + auto `media/pr
|
||||
|
||||
## Public deploy (Docker + Caddy)
|
||||
|
||||
Production: **https://cyd.smallzhiyuns.com**
|
||||
Server layout: `/home/dsx2016/docker/cydweb` + Caddy reverse proxy `127.0.0.1:3020`.
|
||||
Production: **https://cyd.smallzhiyuns.com**
|
||||
|
||||
完整账号、路径、Caddy、Cloudflare、排错与 AI 检查清单见 **[DEPLOY.md](./DEPLOY.md)**(含 SSH 密码与一键脚本说明)。
|
||||
|
||||
```powershell
|
||||
npm run sync:firmware
|
||||
# On server:
|
||||
cd /home/dsx2016/docker/cydweb
|
||||
docker compose up -d --build
|
||||
# Reload Caddy after Caddyfile changes:
|
||||
cd /home/dsx2016/docker/caddy && docker compose exec caddy caddy reload --config /etc/caddy/Caddyfile
|
||||
```
|
||||
|
||||
```env
|
||||
NEXT_PUBLIC_SITE_URL=https://cyd.smallzhiyuns.com
|
||||
CYD_FIRMWARE_ROOT=/app/firmware
|
||||
npm run deploy
|
||||
```
|
||||
|
||||
Web Serial requires **HTTPS** (or localhost).
|
||||
@@ -103,6 +95,7 @@ Web Serial requires **HTTPS** (or localhost).
|
||||
| `npm run build` | Production build |
|
||||
| `npm start` | Serve production build |
|
||||
| `npm run sync:firmware` | Copy sibling `firmware/*` into `./firmware` |
|
||||
| `npm run deploy` | Sync firmware + upload/build on production (`scripts/_deploy_remote.py`) |
|
||||
| `npm run lint` | ESLint |
|
||||
|
||||
## Project layout
|
||||
@@ -120,4 +113,6 @@ messages/ # en.json · zh.json
|
||||
|
||||
本机:`npm run dev` → http://localhost:3000 ,右上角切语言。先选板型(目前仅 2.8\" 可用),再在卡片目录里选固件刷写。
|
||||
|
||||
为固件增加封面 / 动画 / 视频 / 文档:在对应 `firmware/<variant>/` 下放 `meta.json` 与 `media/` 文件即可,无需改前端代码。
|
||||
为固件增加封面:在对应 `firmware/<variant>/media/preview.html`(及可选 `meta.json`)即可,卡片用 HTML iframe 预览,无需改前端。
|
||||
|
||||
公网部署与服务器账号见 **[DEPLOY.md](./DEPLOY.md)**。
|
||||
|
||||
Reference in New Issue
Block a user