Repository navigation
feat(packaging): self-contained Synology package (SPK) that runs Lens in Container Manager - #11
Merged
Merged
Conversation
…nager packaging/synology/build.sh builds the API/worker and web app images, saves them with SurrealDB into the package, and DSM's docker-project resource has Container Manager load them and run the stack as a project. A short install wizard sets the port, address and setup code; data and secrets live in a 'lens' shared folder. A manual workflow builds x86_64 and armv8 packages. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LtuHjBJoEHFFDYrnmYMrGe
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LtuHjBJoEHFFDYrnmYMrGe
The Release workflow publishes with GITHUB_TOKEN, which fires no release event, so it starts this workflow with -f tag=vX.Y.Z instead. The build number defaults to the run number on every trigger, so dispatched release builds upgrade the last one too. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LtuHjBJoEHFFDYrnmYMrGe
5 of 8 tasks
…settings through - A one-shot cleanup container (docker:27-cli, bundled) removes labelled Lens images of earlier versions once the new containers are up. - The wizard gains an optional mail page; MAIL_* and LENS_* lines in lens.conf reach the API and the worker through an env file. - The image tarball sits at the package root, as in Synology's docker-project example. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LtuHjBJoEHFFDYrnmYMrGe
…kdkof # Conflicts: # CHANGELOG.md
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:31
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 Synology NAS meant copying the compose file over, building or pulling images and setting up the containers by hand in Container Manager.
After: each published GitHub release carries
.spkfiles for x86_64 and 64-bit ARM. To install, use Manual Install in Package Center and answer a three-field wizard (port, address, setup code). Lens then runs and appears in the DSM main menu. Upgrades are another Manual Install, and the data and secrets stay.The package carries the API/worker, web app and SurrealDB images. It hands them to Container Manager through DSM's
docker-projectresource (DSM 7.2.1+, Container Manager 1432+), so the NAS pulls nothing and no container is set up by hand.How.
packaging/synology/build.shdoes the build:x86_64orarmv8).images/lens-images.tar.gzinside the package.conf/resource(alensshared folder plus the docker project) and the scripts.scripts/postinstruns as the unprivileged package user:lens.confinto the shared folder. The secrets are generated once and kept across upgrades and reinstalls.compose.yaml:docker-compose.prod.ymlwith built images, bind mounts into the share, and a one-shotpermissionscontainer that handslens/archiveto uid 1000.The Synology package workflow runs when a release is published. It builds both architectures and attaches the
.spkfiles to the release, numbered by run so each one installs as an upgrade. You can also run it by hand from Actions to build thefullimage or a chosen build number.Build and install
Or publish a release, or use Actions > Synology package > Run workflow, then download the
.spk.On the NAS:
.spk, and accept the third-party warning.Full notes are in
packaging/synology/README.md.Tested
/var/packages/lens.postinstas an unprivileged user with the wizard's answers,docker loaded the bundled tarball and brought the rendered project up:permissionsexited 0./dataas uid 1000.postinstwith no wizard answers (an upgrade) leftlens.confuntouched.shellcheckandactionlintare clean.🤖 Generated with Claude Code
https://claude.ai/code/session_01LtuHjBJoEHFFDYrnmYMrGe