Repository navigation
feat(packaging): self-contained QNAP QPKG, built for each release - #13
Merged
Merged
Conversation
packaging/qnap/build.sh builds the images for the NAS's platform, saves them into the package with SurrealDB, and runs QDK's qbuild (in a container, so only Docker is needed). On the NAS, lens.sh loads the images into Container Station on the first start, writes lens.env with fresh secrets in a data folder that outlasts removal, logs the first-admin setup code to the QTS system log, and runs the stack with docker compose. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KSuGMk2LX7Csu1f7pKqoFC
.github/workflows/qnap.yml builds the x86_64 and arm_64 QPKGs when a release is published (or by hand for a tag) and attaches them to the release. ARM builds run under QEMU unless the QNAP_ARM_RUNNER variable names an ARM runner. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KSuGMk2LX7Csu1f7pKqoFC
This was referenced Oct 2, 2026
feat(release): semantic versions and release notes from Conventional Commits in one workflow run
#17
8000
Merged
…nswers from lens.env - A QNAP archive.yaml (mounted read-only) with a media namespace on /audio, and /audio is now just Multimedia/Lens, created on the first start, not the whole share. - The package's images are tagged qnap-<version>; upgrades and removal touch only those, so Lens images built some other way (lens-backend:prod) stay. - build.sh builds the lean backend by default (--target full for documents). - The compose file passes the LENS_ADMIN_*, LENS_NAMESPACE, LENS_LLM_* and LENS_SETUP_WIZARD settings through from lens.env, empty by default. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KSuGMk2LX7Csu1f7pKqoFC
…or the namespace The QNAP archive.yaml no longer defines a media namespace: the first-run setup asks for one (or LENS_NAMESPACE names it) and can watch /audio, the NAS's Multimedia/Lens folder. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KSuGMk2LX7Csu1f7pKqoFC
Merged
3 of 8 tasks
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SNbRrpHTCqLewRKdkmd45X
adeelahmad
marked this pull request as ready for review
October 2, 2026 13:32
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SNbRrpHTCqLewRKdkmd45X
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Adeel · project thread
Before: running Lens on a QNAP NAS meant setting up the compose stack by hand in Container Station.
After:
packaging/qnap/build.shbuilds a.qpkgthat installs from the App Center (Install Manually). The package carries the Lens images and SurrealDB, so the NAS pulls and builds nothing. It runs in Container Station, opens from the App Center's Open button, and puts the first-admin setup code in the QTS system log. The setup wizard from #19 then asks for the namespace, the model provider and storage. Publishing a GitHub release builds both packages and attaches them to the release.How. The package is built with QDK v2.5.3, run in a small container so only Docker is needed. There is one package per architecture (
x86_64,arm_64).build.shbuilds the images for the NAS's platform, saves them into the package with a manifest, and runsqbuild. The backend uses theleantarget by default (--target fulladds the document converters), and the images are taggedqnap-<version>.On the NAS, the service script
lens.shdoes the following:lens.envwith fresh secrets to/share/Container/lens, a data folder that is kept when the app is removeddocker compose upas the projectlensUpgrades and removal touch only this package's
qnap-*image tags, so images likelens-backend:prodstay.The package's own
archive.yamlis mounted read-only. It defines no namespaces, so the wizard asks for one, orLENS_NAMESPACEnames it. Its only local root is/audio, which maps to the NAS'sMultimedia/Lensfolder (created on the first start); the rest of the share isn't exposed. The wizard's storage step can watch that folder. The compose file passesLENS_ADMIN_*,LENS_NAMESPACE,LENS_LLM_*andLENS_SETUP_WIZARDthrough fromlens.env. They are empty by default, which leaves the setup to the web app.Releases.
.github/workflows/qnap.ymlis self-contained. It runs when a release is published, or by hand from the Actions tab with a tag. It builds both packages with the tag as the version and uploads only the QNAP assets, and fails clearly if a package is over GitHub's 2 GiB asset limit. The ARM package is built under QEMU unless the repository variableQNAP_ARM_RUNNERnames an ARM runner. A draft made byrelease.ymlmust be published by a person, because releases published withGITHUB_TOKENdon't trigger other workflows.Build
Install
.qpkg. Accept the warning that the app is unsigned.http://<NAS>:3000.lens.env, or printed bylens.sh setup-code./audio.Tested
In a Linux container with the QTS tools (
getcfg,setcfg,write_log) stubbed and stand-in Lens images (this sandbox can't reach Debian's apt mirrors, so the real images couldn't be built here):qbuildpackaged the files and the package's contents and metadata were checkedarchive.yamlreached the API, andMultimedia/Lenswas createdlens-backend:prodimage were keptmain,docker compose configandshellcheckare cleanactionlintNot yet tested: installing on a real NAS, the real images, and a run of the release workflow (there are no releases yet).
🤖 Generated with Claude Code
https://claude.ai/code/session_01KSuGMk2LX7Csu1f7pKqoFC