Skip to content

Commit 957442e

Browse files
committed
merge: 群晖与威联通 Docker 套件
2 parents b296cbb + 3f07d32 commit 957442e

27 files changed

Lines changed: 657 additions & 15 deletions

‎.github/workflows/packages.yml‎

Lines changed: 76 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Packages
22

3-
# 全平台安装包:npm、Windows、macOS、Linux、飞牛OS、安卓(单机版、客户端版,各分手机版、平板版)
4-
# Prisma 引擎与构建机平台绑定,因此每个平台在对应架构的 Runner 上分别构建
3+
# 全平台安装包:npm、Windows、macOS、Linux、飞牛OS、群晖、威联通、安卓(单机版、客户端版,各分手机版、平板版)
4+
# Prisma 引擎与构建机平台绑定,因此原生平台在对应架构的 Runner 上分别构建;群晖/威联通为 noarch Docker 套件
55
on:
66
push:
77
tags:
@@ -342,6 +342,79 @@ jobs:
342342
path: dist/WrongNotebook-FnOS-*.fpk
343343
if-no-files-found: error
344344

345+
synology:
346+
name: Synology SPK
347+
if: github.server_url == 'https://github.com'
348+
runs-on: ubuntu-24.04
349+
timeout-minutes: 30
350+
steps:
351+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
352+
353+
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
354+
with:
355+
node-version: '24'
356+
cache: 'npm'
357+
358+
- name: Resolve version
359+
shell: bash
360+
run: |
361+
if [[ "$GITHUB_REF" == refs/tags/v* ]]; then
362+
echo "PACKAGE_VERSION=${GITHUB_REF_NAME#v}" >> "$GITHUB_ENV"
363+
fi
364+
365+
- run: npm ci --no-audit --no-fund
366+
367+
- name: Build SPK
368+
run: node scripts/package/build.mjs synology
369+
370+
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
371+
with:
372+
name: package-synology
373+
path: dist/WrongNotebook-Synology-*.spk
374+
if-no-files-found: error
375+
376+
qnap:
377+
name: QNAP QPKG
378+
if: github.server_url == 'https://github.com'
379+
runs-on: ubuntu-24.04
380+
timeout-minutes: 30
381+
steps:
382+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
383+
384+
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
385+
with:
386+
node-version: '24'
387+
cache: 'npm'
388+
389+
- name: Resolve version
390+
shell: bash
391+
run: |
392+
if [[ "$GITHUB_REF" == refs/tags/v* ]]; then
393+
echo "PACKAGE_VERSION=${GITHUB_REF_NAME#v}" >> "$GITHUB_ENV"
394+
fi
395+
396+
- name: Install QDK
397+
shell: bash
398+
run: |
399+
curl -fsSL -o /tmp/qdk.deb "https://github.com/qnap-dev/QDK/releases/download/v2.5.3/qdk_2.5.3_amd64.deb"
400+
echo "17b3841b7d4590a4ee025844ba583304b5e3c497d9fa8934d5175131d3908022 /tmp/qdk.deb" | sha256sum -c -
401+
sudo apt-get install -y /tmp/qdk.deb
402+
export PATH="$PATH:/usr/share/QDK/bin"
403+
qbuild --version || true
404+
405+
- run: npm ci --no-audit --no-fund
406+
407+
- name: Build QPKG
408+
run: |
409+
export PATH="$PATH:/usr/share/QDK/bin"
410+
node scripts/package/build.mjs qnap
411+
412+
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
413+
with:
414+
name: package-qnap
415+
path: dist/WrongNotebook-QNAP-*.qpkg
416+
if-no-files-found: error
417+
345418
android:
346419
name: Android
347420
if: github.server_url == 'https://github.com'
@@ -456,7 +529,7 @@ jobs:
456529

457530
release:
458531
name: Upload to Release
459-
needs: [npm, desktop, fnos, android]
532+
needs: [npm, desktop, fnos, synology, qnap, android]
460533
if: github.server_url == 'https://github.com' && startsWith(github.ref, 'refs/tags/v')
461534
runs-on: ubuntu-latest
462535
steps:

‎README.en.md‎

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ An AI-powered notebook for the questions you got wrong. Snap a photo or type a q
3030

3131
- **🆓 Works with free accounts**: choose the "MiniMax Code OAuth" channel and sign in with a MiniMax Code account in the browser, with no API key to buy; the app checks in every day to collect credits (see [MiniMax Code OAuth](#minimax-code-oauth)). New Volcengine users also get a [free inference quota](#volcengine-free-trial).
3232
- **📚 A complete review loop**: auto-graded similar questions, AI mastery estimates, daily review at Ebbinghaus intervals, and printable exams built from your mistakes with per-question results.
33-
- **📦 Install anywhere**: Docker image (amd64 / arm64), npm, Windows, macOS, Linux, fnOS, Android phones and tablets (standalone or client), or add it to your home screen as a PWA.
33+
- **📦 Install anywhere**: Docker image (amd64 / arm64), npm, Windows, macOS, Linux, fnOS, Synology/QNAP packages, Android phones and tablets (standalone or client), or add it to your home screen as a PWA.
3434

3535
> This repository is a fork of [wttwins/wrong-notebook](https://github.com/wttwins/wrong-notebook); most of the features above and below were added here. The built-in knowledge-point library follows the Chinese K-12 curriculum (primary, junior high and senior high school). The interface is available in Simplified Chinese and English.
3636
@@ -193,7 +193,7 @@ Practice statistics show total practice, accuracy (correct / attempted) and acti
193193

194194
Ordered from easiest to most hands-on. Fresh installs have no default account: the first start generates a one-time setup link where you choose the admin email and password, then the setup wizard helps you set up an AI provider and create your first notebook. The desktop and standalone Android apps open the link automatically; for Docker run `docker logs wrong-notebook 2>&1 | grep initialize`; npm and source runs print it in the terminal. If the link host is `localhost`, replace it with the server address when opening it from another device (or set `NEXTAUTH_URL`). Until an admin exists, the sign-in page shows these instructions too.
195195

196-
### Option 1: Installers (Windows / macOS / Linux / fnOS / Android / npm)
196+
### Option 1: Installers (Windows / macOS / Linux / fnOS / Synology / QNAP / Android / npm)
197197

198198
Download the package for your platform from the [download page](https://wrong-notebook.margrop.net/en/download/) (detects your OS and architecture) or from [Releases](https://github.com/margrop/wrong-notebook/releases), install it and open it:
199199

@@ -203,6 +203,8 @@ Download the package for your platform from the [download page](https://wrong-no
203203
| macOS | `WrongNotebook-Mac-<version>-arm64.dmg` (Apple silicon), `WrongNotebook-Mac-<version>-x64.dmg` (Intel) |
204204
| Linux | `WrongNotebook-Linux-<version>-<arch>.AppImage`, `.deb` |
205205
| fnOS | `WrongNotebook-FnOS-<version>-x86.fpk`, `WrongNotebook-FnOS-<version>-arm.fpk` |
206+
| Synology DSM | `WrongNotebook-Synology-<version>.spk` (manual install in Package Center; Docker package, requires Container Manager) |
207+
| QNAP QTS | `WrongNotebook-QNAP-<version>.qpkg` (manual install in App Center; Docker package, requires Container Station) |
206208
| Android phone / tablet (standalone) | `WrongNotebook-Android-Phone-<version>.apk` (portrait), `WrongNotebook-Android-Tablet-<version>.apk` (rotates between portrait and landscape) |
207209
| Android phone / tablet (client) | `WrongNotebook-Android-Client-Phone-<version>.apk`, `WrongNotebook-Android-Client-Tablet-<version>.apk` |
208210

@@ -295,6 +297,10 @@ Unraid creates the host directories if they do not exist. After the first start,
295297

296298
DSM 7.2 or later uses **Container Manager** (older versions use the Docker package). The suggested data directory is `/volume1/docker/wrong-notebook/{data,config}`; create it first in File Station or over SSH, and replace the path if your storage volume differs.
297299

300+
**Package install (recommended)**: install Container Manager first, then choose `WrongNotebook-Synology-<version>.spk` under Package Center → **Manual Install**. The package pulls the matching image, generates `NEXTAUTH_SECRET`, maps host port `39300` to container `3000`, and stores data at `<package volume>/docker/wrong-notebook/{data,config}`; the Package Center **Open** link opens the app, and the first start shows the admin setup page. Upgrading the package recreates the container from the new image and keeps data; uninstalling keeps the data directory.
301+
302+
Manual container method:
303+
298304
1. **Pull the image**: Container Manager → **Image** → Add, search the registry for `margrop/wrong-notebook`, or add `ghcr.io/margrop/wrong-notebook:<exact-version>` by URL.
299305
2. **Create the container**: **Container** → Add → Create from image. Name it `wrong-notebook`; map host port `3000` → container `3000`; mount `/volume1/docker/wrong-notebook/data` → `/app/data` and `.../config` → `/app/config` (read/write); set `NEXTAUTH_SECRET`, `NEXTAUTH_URL` and `PRESERVE_EXISTING_DATA=true`; enable auto restart.
300306
3. **Initialize**: after starting, find the `initialize` link in the container details log (the token is also in `/volume1/docker/wrong-notebook/config/setup-token`), then set the admin email and password.
@@ -305,6 +311,10 @@ DSM 7.2 or later uses **Container Manager** (older versions use the Docker packa
305311

306312
Use **Container Station**. The suggested data directory is `/share/Container/wrong-notebook/{data,config}`; Container Station's default shared folder is `Container`, so replace the path if you store data elsewhere.
307313

314+
**Package install (recommended)**: install Container Station first, then choose `WrongNotebook-QNAP-<version>.qpkg` under App Center → **Manual Install**. The package pulls the matching image, generates `NEXTAUTH_SECRET`, maps host port `39300` to container `3000`, and stores data at `/share/Container/wrong-notebook/{data,config}`; the App Center open link opens the app, and the first start shows the admin setup page. Upgrading the package recreates the container from the new image and keeps data; uninstalling keeps the data directory.
315+
316+
Manual container method:
317+
308318
1. **Pull the image**: pull `ghcr.io/margrop/wrong-notebook:<exact-version>` on the image page; you can also run `docker pull` over SSH or use an **Application** (Compose).
309319
2. **Create the container**: Container → Create, select the pulled image. Name it `wrong-notebook`; map host port `3000` → container `3000`; mount `/share/Container/wrong-notebook/data` → `/app/data` and `.../config` → `/app/config`; set `NEXTAUTH_SECRET`, `NEXTAUTH_URL` and `PRESERVE_EXISTING_DATA=true`; restart policy `unless-stopped`.
310320
3. **Initialize**: after starting, find the `initialize` link in the container log (the token is in `/share/Container/wrong-notebook/config/setup-token`).
@@ -591,7 +601,7 @@ For usage, deployment and FAQ, see the [Wiki in English](https://github.com/marg
591601

592602
| Document | Content |
593603
| :--- | :--- |
594-
| [INSTALL_PACKAGES.md](doc/INSTALL_PACKAGES.md) | npm, desktop, fnOS and Android packages and builds |
604+
| [INSTALL_PACKAGES.md](doc/INSTALL_PACKAGES.md) | npm, desktop, fnOS, Synology/QNAP packages and Android packages and builds |
595605
| [HTTPS_SETUP.md](doc/HTTPS_SETUP.md) | HTTPS setup (needed for screen capture) |
596606
| [TIME_ZONE.md](doc/TIME_ZONE.md) | Application time zone |
597607
| [LOGGING_GUIDE.md](doc/LOGGING_GUIDE.md) | Logging |

‎README.md‎

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
- **🆓 免费账号就能用**:选择「MiniMax Code OAuth」渠道,用 MiniMax Code 账号网页登录即可使用,不需要购买 API Key,应用每天自动签到领取积分(见 [MiniMax Code OAuth](#minimax-code-oauth));火山引擎新用户也有[免费推理额度](#火山引擎免费试用)。
3232
- **📚 复习闭环**:举一反三变式题自动判题、AI 评估掌握概率、艾宾浩斯间隔的今日复习、按错题组卷打印并回填结果。
33-
- **📦 多平台安装**:Docker 镜像(amd64 / arm64)、npm、Windows、macOS、Linux、飞牛OS、安卓手机与平板(单机版或客户端),也可添加到手机主屏幕(PWA)。
33+
- **📦 多平台安装**:Docker 镜像(amd64 / arm64)、npm、Windows、macOS、Linux、飞牛OS、群晖/威联通套件、安卓手机与平板(单机版或客户端),也可添加到手机主屏幕(PWA)。
3434

3535
> 本仓库 fork 自 [wttwins/wrong-notebook](https://github.com/wttwins/wrong-notebook),在其基础上增加了上述及下文列出的大部分功能。
3636
@@ -193,7 +193,7 @@
193193

194194
按上手难度从易到难排列。全新安装没有默认账号:首次启动时会生成一次性初始化链接,打开后设置管理员邮箱和密码,再进入安装向导配置 AI 渠道、创建第一个错题本。桌面版、安卓单机版会自动打开该链接;Docker 用 `docker logs wrong-notebook 2>&1 | grep initialize` 查看;npm、源码运行打印在终端里。链接中的主机为 `localhost` 时,从其他设备访问需换成服务器地址(或设置 `NEXTAUTH_URL`)。尚未创建管理员时,登录页也会显示这些说明。
195195

196-
### 方式一:安装包(Windows / macOS / Linux / 飞牛OS / 安卓 / npm)
196+
### 方式一:安装包(Windows / macOS / Linux / 飞牛OS / 群晖 / 威联通 / 安卓 / npm)
197197

198198
从[下载页](https://wrong-notebook.margrop.net/download/)(自动识别系统与架构)或 [Releases](https://github.com/margrop/wrong-notebook/releases) 下载对应安装包,安装后直接打开:
199199

@@ -203,6 +203,8 @@
203203
| macOS | `WrongNotebook-Mac-<版本>-arm64.dmg`(Apple 芯片)、`WrongNotebook-Mac-<版本>-x64.dmg`(Intel) |
204204
| Linux | `WrongNotebook-Linux-<版本>-<架构>.AppImage`、`.deb` |
205205
| 飞牛OS | `WrongNotebook-FnOS-<版本>-x86.fpk`、`WrongNotebook-FnOS-<版本>-arm.fpk` |
206+
| 群晖 DSM | `WrongNotebook-Synology-<版本>.spk`(套件中心手动安装,Docker 套件,需 Container Manager) |
207+
| 威联通 QTS | `WrongNotebook-QNAP-<版本>.qpkg`(App Center 手动安装,Docker 套件,需 Container Station) |
206208
| 安卓手机 / 平板(单机版) | `WrongNotebook-Android-Phone-<版本>.apk`(竖屏)、`WrongNotebook-Android-Tablet-<版本>.apk`(横竖屏自动旋转) |
207209
| 安卓手机 / 平板(客户端) | `WrongNotebook-Android-Client-Phone-<版本>.apk`、`WrongNotebook-Android-Client-Tablet-<版本>.apk` |
208210

@@ -293,6 +295,10 @@ wrong-notebook --port 3000
293295

294296
DSM 7.2 及以上使用 **Container Manager**(旧版为 Docker 套件)。建议数据目录为 `/volume1/docker/wrong-notebook/{data,config}`;先在 File Station 或 SSH 中创建,其他存储卷路径相应替换。
295297

298+
**套件安装(推荐)**:先安装 Container Manager,然后在套件中心 →「手动安装」选择 `WrongNotebook-Synology-<版本>.spk`。套件自动拉取对应版本镜像、生成 `NEXTAUTH_SECRET`、把主机端口 `39300` 映射到容器 `3000`,数据放在套件所在存储卷的 `/docker/wrong-notebook/{data,config}`;套件中心的「打开」进入应用,首次启动按页面提示设置管理员。升级套件会按新镜像重建容器并保留数据,卸载套件保留数据目录。
299+
300+
手动容器方式:
301+
296302
1. **拉取映像**:Container Manager → **映像** → 新增,从注册表搜索 `margrop/wrong-notebook`,或从 URL 添加 `ghcr.io/margrop/wrong-notebook:<精确版本>`。
297303
2. **新建容器**:**容器** → 新增 → 从映像创建。容器名 `wrong-notebook`;端口本地 `3000` → 容器 `3000`;卷映射 `/volume1/docker/wrong-notebook/data` → `/app/data`、`.../config` → `/app/config`(读写);环境变量 `NEXTAUTH_SECRET`、`NEXTAUTH_URL`、`PRESERVE_EXISTING_DATA=true`;开启自动重启。
298304
3. **初始化**:启动后在容器详情日志中查找 `initialize` 链接(令牌也在 `/volume1/docker/wrong-notebook/config/setup-token`),设置管理员邮箱和密码。
@@ -303,6 +309,10 @@ DSM 7.2 及以上使用 **Container Manager**(旧版为 Docker 套件)。建
303309

304310
使用 **Container Station**。建议数据目录为 `/share/Container/wrong-notebook/{data,config}`;Container Station 的默认共享文件夹是 `Container`,自定义存储位置时相应替换。
305311

312+
**套件安装(推荐)**:先安装 Container Station,然后在 App Center →「手动安装」选择 `WrongNotebook-QNAP-<版本>.qpkg`。套件自动拉取对应版本镜像、生成 `NEXTAUTH_SECRET`、把主机端口 `39300` 映射到容器 `3000`,数据放在 `/share/Container/wrong-notebook/{data,config}`;App Center 的打开链接进入应用,首次启动按页面提示设置管理员。升级套件会按新镜像重建容器并保留数据,卸载套件保留数据目录。
313+
314+
手动容器方式:
315+
306316
1. **拉取映像**:在映像页拉取 `ghcr.io/margrop/wrong-notebook:<精确版本>`;也可通过 SSH 执行 `docker pull`,或使用 **应用程序**(Compose)方式。
307317
2. **新建容器**:容器 → 创建,选择已拉取的映像。容器名 `wrong-notebook`;端口主机 `3000` → 容器 `3000`;卷映射 `/share/Container/wrong-notebook/data` → `/app/data`、`.../config` → `/app/config`;环境变量 `NEXTAUTH_SECRET`、`NEXTAUTH_URL`、`PRESERVE_EXISTING_DATA=true`;重启策略 `unless-stopped`。
308318
3. **初始化**:启动后在容器日志中查找 `initialize` 链接(令牌在 `/share/Container/wrong-notebook/config/setup-token`)。
@@ -589,7 +599,7 @@ E2E 启动器会在系统临时目录复制应用和依赖、执行正式迁移
589599

590600
| 文档 | 内容 |
591601
| :--- | :--- |
592-
| [INSTALL_PACKAGES.md](doc/INSTALL_PACKAGES.md) | npm、桌面版、飞牛OS、安卓安装包与构建 |
602+
| [INSTALL_PACKAGES.md](doc/INSTALL_PACKAGES.md) | npm、桌面版、飞牛OS、群晖/威联通套件、安卓安装包与构建 |
593603
| [HTTPS_SETUP.md](doc/HTTPS_SETUP.md) | HTTPS 配置(屏幕截图需要) |
594604
| [TIME_ZONE.md](doc/TIME_ZONE.md) | 应用时区 |
595605
| [LOGGING_GUIDE.md](doc/LOGGING_GUIDE.md) | 日志 |

0 commit comments

Comments
 (0)