diff --git a/.agent/tools/deployment/cloudron-app-packaging.md b/.agent/tools/deployment/cloudron-app-packaging.md index 160ac9338..d9d27aa22 100644 --- a/.agent/tools/deployment/cloudron-app-packaging.md +++ b/.agent/tools/deployment/cloudron-app-packaging.md @@ -20,7 +20,8 @@ tools: - **Purpose**: Package any web application for Cloudron deployment - **Docs**: [docs.cloudron.io/packaging](https://docs.cloudron.io/packaging/tutorial/) -- **Examples**: [git.cloudron.io/cloudron](https://git.cloudron.io/cloudron) (all official apps) +- **Source Code**: [git.cloudron.io/packages](https://git.cloudron.io/packages) (200+ official app packages) +- **By Technology**: [git.cloudron.io/explore/projects/topics](https://git.cloudron.io/explore/projects/topics) (PHP, Node, Python, Go, etc.) - **CLI**: `npm install -g cloudron` then `cloudron login my.cloudron.example` - **Workflow**: `cloudron build && cloudron update --app testapp` - **Debug**: `cloudron exec --app testapp` or `cloudron debug --app testapp` @@ -77,6 +78,12 @@ Before starting to package an app, search the Cloudron forum for existing knowle This research often saves significant trial-and-error, especially for apps with non-standard storage, auth, or process models. +## Using git.cloudron.io as Reference + +Study real-world packaging patterns from 200+ official Cloudron app packages at https://git.cloudron.io/. + +**Full guide**: `cloudron-git-reference.md` - Repository structure, finding apps by technology, GitLab API usage, recommended reference apps by use case, cloning patterns, and common search patterns. + ## Overview Cloudron app packaging creates Docker containers that integrate with Cloudron's platform features: automatic SSL, user management (LDAP/OIDC), backups, and addon services. @@ -814,17 +821,40 @@ curl -v http://localhost:8000/health ## Resources -- **Official Docs**: https://docs.cloudron.io/packaging/ -- **Example Apps**: https://git.cloudron.io/cloudron (all official packages) -- **Forum**: https://forum.cloudron.io/category/96/app-packaging-development -- **Base Image**: https://hub.docker.com/r/cloudron/base +### Official Documentation + +- **Packaging Tutorial**: https://docs.cloudron.io/packaging/tutorial/ +- **Packaging Reference**: https://docs.cloudron.io/packaging/ - **CLI Reference**: https://docs.cloudron.io/packaging/cli/ +- **Publishing Guide**: https://docs.cloudron.io/packaging/publishing/ +- **Addon Reference**: https://docs.cloudron.io/packaging/addons/ + +### git.cloudron.io (Source Code) + +The GitLab instance at https://git.cloudron.io/ is the authoritative source for all Cloudron app packages. See "Using git.cloudron.io as Reference" section above for detailed usage. + +| Resource | URL | +|----------|-----| +| **All Packages** | https://git.cloudron.io/packages | +| **Explore by Topic** | https://git.cloudron.io/explore/projects/topics | +| **Recently Updated** | https://git.cloudron.io/explore/projects?sort=latest_activity_desc | +| **Platform Code** | https://git.cloudron.io/platform | +| **Documentation Source** | https://git.cloudron.io/docs/docs | +| **GitLab API** | https://git.cloudron.io/api/v4/ | ### Example Repos by Framework -- **PHP**: https://git.cloudron.io/explore/projects?tag=php -- **Node.js**: https://git.cloudron.io/explore/projects?tag=node -- **Python**: https://git.cloudron.io/explore/projects?tag=python -- **Go**: https://git.cloudron.io/explore/projects?tag=go -- **Ruby/Rails**: https://git.cloudron.io/explore/projects?tag=rails -- **Java**: https://git.cloudron.io/explore/projects?tag=java +| Framework | Topic URL | Example App | +|-----------|-----------|-------------| +| PHP | https://git.cloudron.io/explore/projects/topics/php | nextcloud-app, wordpress-app | +| Node.js | https://git.cloudron.io/explore/projects/topics/node | ghost-app, nodebb-app | +| Python | https://git.cloudron.io/explore/projects/topics/python | synapse-app | +| Go | https://git.cloudron.io/explore/projects/topics/go | vikunja-app | +| Ruby/Rails | https://git.cloudron.io/explore/projects/topics/rails | discourse-app | +| Java | https://git.cloudron.io/explore/projects/topics/java | metabase-app | + +### Other Resources + +- **Forum (Packaging)**: https://forum.cloudron.io/category/96/app-packaging-development +- **Base Image Tags**: https://hub.docker.com/r/cloudron/base/tags +- **App Store**: https://cloudron.io/store/index.html diff --git a/.agent/tools/deployment/cloudron-git-reference.md b/.agent/tools/deployment/cloudron-git-reference.md new file mode 100644 index 000000000..b63bf64de --- /dev/null +++ b/.agent/tools/deployment/cloudron-git-reference.md @@ -0,0 +1,124 @@ +--- +description: Reference guide for using git.cloudron.io to study Cloudron app packaging patterns +mode: subagent +tools: + read: true + bash: true + webfetch: true +--- + +# Using git.cloudron.io as Reference + +The Cloudron GitLab instance at https://git.cloudron.io/ hosts all official app packages and is the authoritative source for packaging patterns. Use it to study real-world implementations when packaging new apps. + +## Repository Structure + +| Group | URL | Purpose | +|-------|-----|---------| +| `packages` | https://git.cloudron.io/packages | Official app packages (200+ apps) | +| `playground` | https://git.cloudron.io/playground | Incubator for new/experimental packages | +| `platform` | https://git.cloudron.io/platform | Cloudron platform code (box, base images) | +| `docs` | https://git.cloudron.io/docs | Official documentation source | +| `apps` | https://git.cloudron.io/apps | Apps developed by Cloudron.io team | +| `utils` | https://git.cloudron.io/utils | Tools and utilities | + +## Finding Reference Apps by Technology + +Browse apps by topic/tag to find packages using similar technology stacks: + +| Technology | URL | Count | +|------------|-----|-------| +| PHP | https://git.cloudron.io/explore/projects/topics/php | 21+ | +| Go | https://git.cloudron.io/explore/projects/topics/go | 11+ | +| Node.js | https://git.cloudron.io/explore/projects/topics/node | 10+ | +| Java | https://git.cloudron.io/explore/projects/topics/java | 10+ | +| Python | https://git.cloudron.io/explore/projects/topics/python | 6+ | +| Ruby/Rails | https://git.cloudron.io/explore/projects/topics/rails | 4+ | +| nginx | https://git.cloudron.io/explore/projects/topics/nginx | 6+ | +| Apache | https://git.cloudron.io/explore/projects/topics/apache | 4+ | +| Supervisor | https://git.cloudron.io/explore/projects/topics/supervisor | 2+ | + +**All topics**: https://git.cloudron.io/explore/projects/topics + +## GitLab API for Programmatic Access + +The GitLab API enables searching and fetching package code programmatically: + +```bash +# List all packages group projects +curl -s "https://git.cloudron.io/api/v4/groups/packages/projects?per_page=100" + +# Search projects by topic +curl -s "https://git.cloudron.io/api/v4/projects?topic=php&per_page=20" + +# Get repository file tree +curl -s "https://git.cloudron.io/api/v4/projects/packages%2Fghost-app/repository/tree" + +# Get raw file content +curl -s "https://git.cloudron.io/api/v4/projects/packages%2Fghost-app/repository/files/start.sh/raw?ref=master" + +# Search for code patterns across repos (requires auth for some endpoints) +curl -s "https://git.cloudron.io/api/v4/projects/packages%2Fghost-app/search?scope=blobs&search=supervisord" +``` + +## Recommended Reference Apps by Use Case + +When packaging a new app, study these well-maintained packages as templates: + +| Use Case | Reference App | Why | +|----------|---------------|-----| +| **Node.js + nginx** | [ghost-app](https://git.cloudron.io/packages/ghost-app) | Clean supervisor setup, nginx proxy | +| **PHP + nginx** | [nextcloud-app](https://git.cloudron.io/packages/nextcloud-app) | Complex PHP app, cron, background jobs | +| **PHP + Apache** | [wordpress-app](https://git.cloudron.io/packages/wordpress-app) | Apache config, plugin handling | +| **Python + nginx** | [synapse-app](https://git.cloudron.io/packages/synapse-app) | Python virtualenv, complex config | +| **Go binary** | [vikunja-app](https://git.cloudron.io/packages/vikunja-app) | Simple Go app with nginx frontend | +| **Java/JVM** | [metabase-app](https://git.cloudron.io/packages/metabase-app) | JVM memory tuning, startup scripts | +| **Ruby/Rails** | [discourse-app](https://git.cloudron.io/packages/discourse-app) | Complex Rails app, sidekiq workers | +| **Multi-process** | [peertube-app](https://git.cloudron.io/packages/peertube-app) | Supervisor with multiple workers | +| **LDAP/OIDC auth** | [grafana-app](https://git.cloudron.io/packages/grafana-app) | Auth integration patterns | +| **Media handling** | [jellyfin-app](https://git.cloudron.io/packages/jellyfin-app) | Large file handling, transcoding | + +## What to Study in Reference Apps + +When examining a reference package, focus on these files: + +1. **CloudronManifest.json** - Addon requirements, memory limits, health check path +2. **Dockerfile** - Base image choice, build steps, file permissions +3. **start.sh** - Initialization sequence, config injection, symlink patterns +4. **nginx/*.conf** or **apache/*.conf** - Web server configuration +5. **supervisor/*.conf** - Multi-process orchestration (if used) +6. **CHANGELOG.md** - Version history and migration patterns + +## Cloning for Local Study + +```bash +# Clone a reference app for local study +git clone https://git.cloudron.io/packages/ghost-app.git + +# Or use sparse checkout for specific files +git clone --filter=blob:none --sparse https://git.cloudron.io/packages/ghost-app.git +cd ghost-app +git sparse-checkout set start.sh Dockerfile CloudronManifest.json +``` + +## Finding Solutions to Specific Problems + +When facing a specific packaging challenge, search across all packages: + +```bash +# Find apps using supervisord +curl -s "https://git.cloudron.io/api/v4/projects?topic=supervisor" + +# Find apps with proxyAuth (Cloudron handles auth) +curl -s "https://git.cloudron.io/api/v4/projects?topic=proxyAuth" + +# Browse recently updated packages (most active/maintained) +# Visit: https://git.cloudron.io/explore/projects?sort=latest_activity_desc +``` + +**Common patterns to search for**: +- `gosu cloudron:cloudron` - Privilege dropping +- `ln -sfn /app/data` - Symlink patterns for writable paths +- `CLOUDRON_POSTGRESQL_` - Database configuration +- `supervisord.conf` - Multi-process setup +- `envsubst` - Template-based config injection diff --git a/TODO.md b/TODO.md index 3dc0b9418..883f9faed 100644 --- a/TODO.md +++ b/TODO.md @@ -52,6 +52,8 @@ Tasks with no open blockers - ready to work on. Use `/ready` to refresh this lis ## Backlog +- [ ] t082 Fix version sync inconsistency (VERSION vs package.json/setup.sh/aidevops.sh) #bugfix ~15m (ai:10m test:5m) logged:2026-01-29 + - Notes: Release commit bd0695c bumped VERSION to 2.92.1 but missed syncing package.json, setup.sh, aidevops.sh, sonar-project.properties, .claude-plugin/marketplace.json. Either fix manually or ensure version-manager.sh is used for all releases. - [ ] t068 Multi-Agent Orchestration & Token Efficiency #plan → [todo/PLANS.md#2026-01-23-multi-agent-orchestration--token-efficiency] ~5d (ai:3d test:1d read:1d) logged:2026-01-23 started:2026-01-23T00:00Z - [x] t068.1 Custom System Prompt (prompts/build.txt) ~2h blocked-by:none completed:2026-01-24 - [x] t068.2 Compaction Plugin (opencode-aidevops-plugin) ~4h blocked-by:t068.1 completed:2026-01-24