8000 feat(packaging): Proxmox VE helper script for a Lens LXC container by adeelahmad · Pull Request #10 · adeelahmad/lense · GitHub
[go: up one dir, main page]

Skip to content

feat(packaging): Proxmox VE helper script for a Lens LXC container - #10

Merged
adeelahmad merged 6 commits into
mainfrom
claude/proxmox-helper-script-5lgdyu
Oct 2, 2026
Merged

adeelahmad merged 6 commits into
mainfrom
claude/proxmox-helper-script-5lgdyu

Conversation

@adeelahmad
@adeelahmad adeelahmad commented Oct 2, 2026 •
Copy link
Copy Markdown
Owner

Requested by Adeel · project thread

Description

Before: running Lens on Proxmox meant setting up Docker in a VM or container by hand.

After: one command in the Proxmox host's shell creates a Debian 13 LXC container running Lens:

bash -c "$(curl -fsSL https://raw.githubusercontent.com/adeelahmad/lense/main/proxmox/ct/lens.sh)"

Open http://<container-ip>:3000, create the admin with the code from lens-setup-code, and the setup wizard at /welcome asks for the first namespace, the model provider and storage.

It follows the community-scripts CT guide: proxmox/ct/lens.sh loads the engine from community-scripts/core and sets _CS_DEFAULT_URL to this repo's proxmox/ folder, so install/lens-install.sh and the update command come from here.

How: the install script installs ffmpeg, Tesseract, poppler, antiword (when the release ships it) and rclone, as the lean Docker image does; Python 3.12 via uv and Node 22 with pnpm via the engine's helpers; and SurrealDB 3.2.4 from its release binary. It clones the latest published GitHub release (main while the repo has none) into /opt/lens-<commit>, links /opt/lens to it, runs uv sync --frozen --no-dev and pnpm build, and writes fresh secrets to /etc/lens/*.env and an archive.yaml with no namespaces (the wizard asks) and /var/lib/lens/media as the folder it may watch. Four systemd services: surrealdb (127.0.0.1:8001), lens-api (127.0.0.1:8000), lens-worker and lens-web (port 3000, the only one on the network). update resolves the latest release the same way and, when it moved, clones and builds it beside the running version while Lens stays up; then it stops the services, switches the link, starts them and removes the old version, so a failed build leaves Lens as it was. It also bumps SurrealDB when the pinned version changes. Publishing a release is all containers need to pick it up, so there is no Proxmox release workflow. Details in proxmox/README.md.

Motivation and Context

Requested in the project thread: support the Proxmox VE community helper scripts.

Steps to reproduce (if appropriate):

Not run on a Proxmox host from here. What was checked:

  • bash -n and shellcheck on both scripts. The only warnings are SC2164 on cd, which the upstream scripts leave as is because catch_errors traps failures.
  • On main with feat(setup): first-run setup wizard answered by .env, and startup on a fresh database #19 merged: SurrealDB 3.2.4 with the generated surrealdb.env, plus the API and lens worker from a uv sync --frozen --no-dev venv, with the generated settings and an archive.yaml with no namespaces. /api/v1/auth/status answers {"setup_required":true,"wizard_pending":true}, the setup code appears in the log, and the worker starts. Before feat(setup): first-run setup wizard answered by .env, and startup on a fresh database #19, a foreign Host header also got a 400.
  • The update's ref logic against a local repo with an annotated tag, a lightweight tag and main: each resolves to and checks out the right commit. With no release, the lookup falls back to main. The /opt/lens link swap was checked separately.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires documentation updates.
  • I have updated the documentation accordingly.
  • My change requires dependencies updates.
  • I have updated the dependencies accordingly.

🤖 Generated with Claude Code

https://claude.ai/code/session_01SKxzVfEUNtRqvqUti2Lc6L

proxmox/ct/lens.sh runs on the Proxmox host with the community-scripts
engine and creates a Debian 13 container; proxmox/install/lens-install.sh
installs SurrealDB 3.2.4, the API, a worker and the web app as systemd
services with fresh secrets. `update` in the container pulls main and
rebuilds.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SKxzVfEUNtRqvqUti2Lc6L
@adeelahmad adeelahmad self-assigned this Oct 2, 2026
Containers track the latest published release, and the newest main while
the repository has none, so publishing a release is enough for `update`
to pick it up. Annotated and lightweight tags both resolve to their commit.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SKxzVfEUNtRqvqUti2Lc6L
claude added 2 commits October 2, 2026 12:50
Each version lives in /opt/lens-<commit> with /opt/lens linked to the
running one. `update` clones and builds the next version beside it while
the services keep running, then stops them, switches the link and starts
them again; a failed build leaves the running version untouched.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SKxzVfEUNtRqvqUti2Lc6L
The install no longer seeds a `media` namespace: with the seq fix from
main a namespace-less archive.yaml starts, and the setup wizard at
/welcome asks for the first namespace. sources.local_roots stays so the
wizard can offer a folder to watch.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SKxzVfEUNtRqvqUti2Lc6L
@adeelahmad adeelahmad changed the title Proxmox VE helper script: Lens in an LXC container feat(packaging): Proxmox VE helper script for a Lens LXC container Oct 2, 2026
claude added 2 commits October 2, 2026 13:31
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SNbRrpHTCqLewRKdkmd45X
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SNbRrpHTCqLewRKdkmd45X
@adeelahmad
adeelahmad marked this pull request as ready for review October 2, 2026 13:32
@adeelahmad
adeelahmad merged commit c68ec82 into main Oct 2, 2026
0 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0