8000 feat(cloudron): package Lens as a Cloudron app, with release image builds by adeelahmad · Pull Request #12 · adeelahmad/lense · GitHub
[go: up one dir, main page]

Skip to content

feat(cloudron): package Lens as a Cloudron app, with release image builds - #12

Merged
adeelahmad merged 7 commits into
mainfrom
claude/cloudron-package-tp886o
Oct 2, 2026
Merged

adeelahmad merged 7 commits into
mainfrom
claude/cloudron-package-tp886o

Conversation

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

Requested by Adeel · project thread

Description

Before: Lens could only be run with docker-compose; there was no way to install it on a Cloudron.

After: the repository is a Cloudron package. From a checkout, cloudron install --location lens -f Dockerfile.cloudron uploads the source, and the Cloudron builds the image itself and runs Lens as one app. Every published GitHub release also builds the Cloudron image and pushes it to GHCR, ready for cloudron install --image or community-app publishing through CloudronVersions.json.

How:

  • CloudronManifest.json (minBoxVersion 9.1.0, localstorage and sendmail addons, health check /api/v1/auth/status through the web app, 3 GB memory) and Dockerfile.cloudron on cloudron/base:5.1.0. The frontend is built in a first stage, and the backend venv is built against the base image's Python 3.12. SurrealDB 3.2.4 and rclone are copied in from their images.
  • cloudron/start.sh creates secrets once in /app/data/secrets.env, including a fixed LENS_SETUP_CODE. It writes /app/data/archive.yaml once with a starting media namespace, because a fresh database needs at least one. It maps CLOUDRON_APP_ORIGIN and CLOUDRON_MAIL_* onto Lens's settings, then runs supervisord.
  • cloudron/supervisord.conf runs:
    • SurrealDB on 127.0.0.1:8001
    • the API on 127.0.0.1:8000
    • the worker
    • next start on :3000
    • export-db.sh, which writes a consistent surreal export to /app/data/backup/lens.surql every 6 h, so Cloudron's live backups always hold a clean copy.
  • cloudron/README.md covers install, update, image builds, community-app publishing and restoring from the export. docs/deployment.md links to it.
  • .github/workflows/cloudron.yml builds the image on PRs that touch packaging files. On a published release it pushes ghcr.io/<owner>/lens-cloudron:<release version> and :latest. It can also be run by hand.

Motivation and Context

Adeel wants to install Lens on their hosted Cloudron, publish it there (https://docs.cloudron.io/packaging/publishing), and have release builds automated.

Steps to reproduce (if appropriate):

I built the image locally and ran it the way Cloudron does: read-only root filesystem, tmpfs on /run and /tmp, a volume on /app/data, the CLOUDRON_* env and a 3 GB limit.

  • All five processes reached RUNNING, and /api/v1/auth/status answered 200 through :3000.
  • /setup returned 200, and / redirected to https://<origin>/login.
  • First-admin setup with the code from secrets.env succeeded.
  • After a restart, setup_required was false and the data persisted.
  • surreal export worked against the running database.
  • Idle memory was about 235 MB.

Not tested here: an actual cloudron install on a Cloudron server, and the GHCR push.

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_01NdWJn5kdhHYz3mjiuQ2mVU

CloudronManifest.json, Dockerfile.cloudron and cloudron/ make the repository a
Cloudron package. One app runs SurrealDB, the API, a job worker and the web app
under supervisord; secrets are made on first start in /app/data, mail goes
through the sendmail addon, and the database is exported every six hours so
backups hold a consistent copy. A workflow builds the image and can push it to
GHCR for community-app publishing.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NdWJn5kdhHYz3mjiuQ2mVU
@adeelahmad adeelahmad self-assigned this Oct 2, 2026
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NdWJn5kdhHYz3mjiuQ2mVU
claude added 3 commits October 2, 2026 12:41
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NdWJn5kdhHYz3mjiuQ2mVU
…tub)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NdWJn5kdhHYz3mjiuQ2mVU
@adeelahmad adeelahmad changed the title Cloudron package: install Lens on your own Cloudron feat(cloudron): package Lens as a Cloudron app, with release image builds Oct 2, 2026
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
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SNbRrpHTCqLewRKdkmd45X
@adeelahmad
adeelahmad merged commit 93cde39 into main Oct 2, 2026
0 of 4 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