From 8918d89b45ecfb50c922bb10d6bd97c03514af4b Mon Sep 17 00:00:00 2001 From: ReachableCEO Date: Fri, 17 Oct 2025 15:09:16 -0500 Subject: [PATCH] Package or bust! --- AGENTS.md | 78 ---- CloudronPackages/.gitignore | 55 +++ CloudronPackages/APISIX/.dockerignore | 11 - CloudronPackages/APISIX/CloudronManifest.json | 19 - CloudronPackages/APISIX/Dockerfile | 38 -- CloudronPackages/APISIX/README.md | 33 -- CloudronPackages/APISIX/config.yaml | 11 - CloudronPackages/APISIX/nginx.conf | 26 -- CloudronPackages/APISIX/start.sh | 39 -- CloudronPackages/APISIX/supervisord.conf | 12 - CloudronPackages/Jenkins/.dockerignore | 11 - .../Jenkins/CloudronManifest.json | 19 - CloudronPackages/Jenkins/Dockerfile | 58 --- CloudronPackages/Jenkins/README.md | 33 -- CloudronPackages/Jenkins/config.yaml | 11 - CloudronPackages/Jenkins/nginx.conf | 26 -- CloudronPackages/Jenkins/start.sh | 22 -- CloudronPackages/Jenkins/supervisord.conf | 12 - .../PackageTemplate/.dockerignore | 11 - .../PackageTemplate/CloudronManifest.json | 19 - CloudronPackages/PackageTemplate/Dockerfile | 38 -- CloudronPackages/PackageTemplate/README.md | 24 -- CloudronPackages/PackageTemplate/config.yaml | 11 - CloudronPackages/PackageTemplate/nginx.conf | 26 -- CloudronPackages/PackageTemplate/start.sh | 39 -- .../PackageTemplate/supervisord.conf | 12 - CloudronPackages/Rathole/.dockerignore | 7 - .../Rathole/CloudronManifest.json | 18 - CloudronPackages/Rathole/Dockerfile | 41 --- CloudronPackages/Rathole/README.md | 36 -- CloudronPackages/Rathole/start.sh | 41 --- CloudronPackages/Rundeck/.dockerignore | 11 - .../Rundeck/CloudronManifest.json | 19 - CloudronPackages/Rundeck/Dockerfile | 38 -- CloudronPackages/Rundeck/README.md | 33 -- CloudronPackages/Rundeck/config.yaml | 11 - CloudronPackages/Rundeck/nginx.conf | 26 -- CloudronPackages/Rundeck/start.sh | 39 -- CloudronPackages/Rundeck/supervisord.conf | 12 - CloudronPackages/SEED_PROMPT.md | 84 +++++ CloudronPackages/Workspace/AGENTS.md | 104 ++++++ CloudronPackages/Workspace/Dockerfile.helper | 52 +++ CloudronPackages/Workspace/PackageList.txt | 56 +++ .../Workspace}/README.md | 0 .../Workspace/TheSoverignCloud.md | 347 ++++++++++++++++++ CloudronPackages/Workspace/manage-repos.sh | 182 +++++++++ CloudronPackages/secret.txt | 11 + .../UpstreamVendor-Clone.sh | 229 ------------ .../UpstreamVendor-Update.sh | 47 --- TODO.md | 11 - docker-compose.yml | 16 - docker/packaging/Dockerfile | 17 - mise.toml | 2 - scripts/new-package.sh | 55 --- scripts/packaging-enter.sh | 9 - scripts/packaging-exec.sh | 14 - scripts/packaging-up.sh | 29 -- scripts/todo-generate.sh | 53 --- scripts/todo-update.sh | 6 - scripts/workspace-clone.sh | 6 - scripts/workspace-update.sh | 6 - 61 files changed, 891 insertions(+), 1471 deletions(-) delete mode 100644 AGENTS.md create mode 100644 CloudronPackages/.gitignore delete mode 100644 CloudronPackages/APISIX/.dockerignore delete mode 100644 CloudronPackages/APISIX/CloudronManifest.json delete mode 100644 CloudronPackages/APISIX/Dockerfile delete mode 100644 CloudronPackages/APISIX/README.md delete mode 100644 CloudronPackages/APISIX/config.yaml delete mode 100644 CloudronPackages/APISIX/nginx.conf delete mode 100644 CloudronPackages/APISIX/start.sh delete mode 100644 CloudronPackages/APISIX/supervisord.conf delete mode 100644 CloudronPackages/Jenkins/.dockerignore delete mode 100644 CloudronPackages/Jenkins/CloudronManifest.json delete mode 100644 CloudronPackages/Jenkins/Dockerfile delete mode 100644 CloudronPackages/Jenkins/README.md delete mode 100644 CloudronPackages/Jenkins/config.yaml delete mode 100644 CloudronPackages/Jenkins/nginx.conf delete mode 100644 CloudronPackages/Jenkins/start.sh delete mode 100644 CloudronPackages/Jenkins/supervisord.conf delete mode 100644 CloudronPackages/PackageTemplate/.dockerignore delete mode 100644 CloudronPackages/PackageTemplate/CloudronManifest.json delete mode 100644 CloudronPackages/PackageTemplate/Dockerfile delete mode 100644 CloudronPackages/PackageTemplate/README.md delete mode 100644 CloudronPackages/PackageTemplate/config.yaml delete mode 100644 CloudronPackages/PackageTemplate/nginx.conf delete mode 100644 CloudronPackages/PackageTemplate/start.sh delete mode 100644 CloudronPackages/PackageTemplate/supervisord.conf delete mode 100644 CloudronPackages/Rathole/.dockerignore delete mode 100644 CloudronPackages/Rathole/CloudronManifest.json delete mode 100644 CloudronPackages/Rathole/Dockerfile delete mode 100644 CloudronPackages/Rathole/README.md delete mode 100644 CloudronPackages/Rathole/start.sh delete mode 100644 CloudronPackages/Rundeck/.dockerignore delete mode 100644 CloudronPackages/Rundeck/CloudronManifest.json delete mode 100644 CloudronPackages/Rundeck/Dockerfile delete mode 100644 CloudronPackages/Rundeck/README.md delete mode 100644 CloudronPackages/Rundeck/config.yaml delete mode 100644 CloudronPackages/Rundeck/nginx.conf delete mode 100644 CloudronPackages/Rundeck/start.sh delete mode 100644 CloudronPackages/Rundeck/supervisord.conf create mode 100644 CloudronPackages/SEED_PROMPT.md create mode 100644 CloudronPackages/Workspace/AGENTS.md create mode 100644 CloudronPackages/Workspace/Dockerfile.helper create mode 100644 CloudronPackages/Workspace/PackageList.txt rename {PackagingForCloudronWorkspace => CloudronPackages/Workspace}/README.md (100%) create mode 100644 CloudronPackages/Workspace/TheSoverignCloud.md create mode 100755 CloudronPackages/Workspace/manage-repos.sh create mode 100644 CloudronPackages/secret.txt delete mode 100755 PackagingForCloudronWorkspace/UpstreamVendor-Clone.sh delete mode 100755 PackagingForCloudronWorkspace/UpstreamVendor-Update.sh delete mode 100644 TODO.md delete mode 100644 docker-compose.yml delete mode 100644 docker/packaging/Dockerfile delete mode 100644 mise.toml delete mode 100755 scripts/new-package.sh delete mode 100755 scripts/packaging-enter.sh delete mode 100755 scripts/packaging-exec.sh delete mode 100755 scripts/packaging-up.sh delete mode 100755 scripts/todo-generate.sh delete mode 100755 scripts/todo-update.sh delete mode 100755 scripts/workspace-clone.sh delete mode 100755 scripts/workspace-update.sh diff --git a/AGENTS.md b/AGENTS.md deleted file mode 100644 index 713c8a9..0000000 --- a/AGENTS.md +++ /dev/null @@ -1,78 +0,0 @@ -# Agent Operating Guide (Project-wide) - -Scope: This file applies to the entire repository. It defines how assistants and automation must work here. - -## Purpose -Package ~100 free/libre/open-source applications as Cloudron apps with a fast, container-only workflow and a minimal, single-branch repo. - -## Golden Rules -- Single branch: use only `main`. Do not create feature branches unless explicitly requested. -- Host is read-only: do not install or modify anything on the host OS. You MAY only check for the presence of tools and run them if already installed. -- Allowed host tools (if present): `docker`, `git`, `tea` (optional), and `curl` for connectivity checks. Never attempt to install or upgrade them. -- Containers only: all build, test, lint, and packaging commands must run inside the packaging container. -- Do not push to remote without approval: never run `git push` for a package change until it has been validated and explicitly approved by the maintainer. -- Keep repo slim: do not commit upstream source trees or build artefacts. Only commit package files under `CloudronPackages//`, small helper scripts, and minimal docs. -- Secrets: do not commit secrets or credentials. Use environment variables or Cloudron addons. -- Consistency: follow `.editorconfig`, `.gitattributes`, and `.gitignore`. - -## Container-Only Workflow -- Packaging image: built from `docker/packaging/Dockerfile`. -- Control scripts (host-side wrappers): - - `scripts/packaging-up.sh` – build and start the packaging container; mounts repo at `/workspace` and `/var/run/docker.sock`. - - `scripts/packaging-enter.sh` – open a shell inside the container. - - `scripts/packaging-exec.sh ` – run any command inside the container. - - `scripts/workspace-clone.sh` – clone upstream repos (inside container). - - `scripts/workspace-update.sh` – update upstream repos (inside container). -- Never run package build/test outside the container. If a command needs to run, wrap it via `scripts/packaging-exec.sh`. - -## Creating a New Package -- Scaffold from template using the helper: - - `scripts/new-package.sh --id --title "Title" --port [--base ]` -- Edit `CloudronPackages//Dockerfile` and `start.sh` to run the app. -- Prefer prebuilt upstream releases over building toolchains in Docker to keep images small. -- Default Cloudron base image tag is `5.0.0`. Override with `--base` as needed. - -## Validation Checklist (must pass before proposing push) -- Build succeeds inside the packaging container: - - `scripts/packaging-exec.sh "docker build -t :dev CloudronPackages/"` -- Run sanity check inside container: - - `scripts/packaging-exec.sh "docker run --rm -p : -v -data:/app/data :dev"` - - Health endpoint responds; logs show no fatal errors; app starts with least privilege. -- Manifest sanity: `CloudronManifest.json` has accurate `id`, `version`, `httpPort` or addon definitions, and `healthCheckPath`. -- No secrets or hard-coded credentials; proper ownership of `/app/data`. -- Image hygiene: no unnecessary build deps; minimal layers; correct exposed ports. -- Optional: `cloudron install --image :dev` tested from inside the packaging container using `cloudron` CLI, if available. - -## Approval Gate and Push Policy -- Commits: frequent, small, and descriptive commits are encouraged; no approval needed for local commits. -- After validation, present a concise summary of changes and validation output to the maintainer and request permission to push. -- Push only at “natural” points (coherent, validated milestones). Examples: - - First green build of a new package scaffold (image builds + container starts + health OK). - - A feature-complete slice (e.g., addon integration added and tested). - - A bug fix with verification. - - Pre-release stabilization checkpoint. -- Batch pushes to avoid noise (aim for 1–3 pushes per active app per work session). -- NEVER push a broken or non‑validated build. -- Only on explicit approval run `git push origin main` for package-affecting changes. -- Never force‑push unless explicitly instructed. - -## Repository Hygiene -- Do not commit upstream repos. The directories `PackagingForCloudronWorkspace/Docker/` and `PackagingForCloudronWorkspace/NonDocker/` are gitignored on purpose. -- Keep package directories focused: `CloudronManifest.json`, `Dockerfile`, `start.sh`, and minimal config (e.g., `nginx.conf`, `supervisord.conf`, `config.yaml`, `logo.png`). -- Use LF line endings and 2-space indentation (see `.editorconfig`/`.gitattributes`). - -## Networking & External Access -- All networked actions (git clones, docker pulls, downloads) must happen from within the packaging container. -- Host-level curl allowance: You MAY use `curl` on the host strictly for quick connectivity checks IF it is already installed. Do not install any host packages. -- Do not attempt other host-level network configuration, filesystem changes outside the repo, or host-level package installation. - -## Commit Messages -- Use conventional, concise messages: - - `feat(): ...` for new packages or features - - `fix(): ...` for fixes - - `chore(...)`, `docs(...)` for non-functional changes -- Avoid large, mixed commits; keep changes scoped to an app. - -## When in Doubt -- Ask for maintainer guidance before introducing new tools, dependencies, or changing global structure. -- Default to safer, smaller changes and explicit approval before pushing. diff --git a/CloudronPackages/.gitignore b/CloudronPackages/.gitignore new file mode 100644 index 0000000..b6ae1f2 --- /dev/null +++ b/CloudronPackages/.gitignore @@ -0,0 +1,55 @@ +# Cloudron Package Repository .gitignore + +# Environment files (contains sensitive credentials) +.env + +# Test artifacts +*.test +test-compose.yml +test-data/ + +# Upstream source repositories (managed by manage-repos.sh) +Workspace/Docker/ +Workspace/NonDocker/ + +# Temporary files +*.tmp +*.temp +*.log + +# OS generated files +.DS_Store +.DS_Store? +._* +.Spotlight-V100 +.Trashes +ehthumbs.db +Thumbs.db + +# IDE files +.vscode/ +.idea/ +*.swp +*.swo +*~ + +# Package archives +*.tar.gz +*.zip + +# Docker volumes +postgres_data/ +redis_data/ +app_data/ + +# Node modules (if any) +node_modules/ + +# Python cache +__pycache__/ +*.pyc +*.pyo + +# Backup files +*.bak +*.backup diff --git a/CloudronPackages/APISIX/.dockerignore b/CloudronPackages/APISIX/.dockerignore deleted file mode 100644 index 090ba8b..0000000 --- a/CloudronPackages/APISIX/.dockerignore +++ /dev/null @@ -1,11 +0,0 @@ -# Ignore typical build context clutter -.git -.gitignore -node_modules -npm-debug.log -*.log -dist -build -Dockerfile.* -.DS_Store - diff --git a/CloudronPackages/APISIX/CloudronManifest.json b/CloudronPackages/APISIX/CloudronManifest.json deleted file mode 100644 index ca3b594..0000000 --- a/CloudronPackages/APISIX/CloudronManifest.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "manifestVersion": 2, - "id": "io.knel.apisix", - "title": "Apache APISIX", - "author": "KNEL", - "description": "Cloudron packaging template for Apache APISIX", - "website": "https://example.com", - "contactEmail": "admin@example.com", - "version": "0.1.0", - "changelog": "Initial package template", - "healthCheckPath": "/", - "httpPort": 9180, - "addons": { - "localstorage": {} - }, - "tags": ["template", "example"], - "icon": "logo.png" -} - diff --git a/CloudronPackages/APISIX/Dockerfile b/CloudronPackages/APISIX/Dockerfile deleted file mode 100644 index 5bec9bd..0000000 --- a/CloudronPackages/APISIX/Dockerfile +++ /dev/null @@ -1,38 +0,0 @@ -FROM cloudron/base:5.0.0 - -# Metadata labels (edit as needed) -LABEL org.opencontainers.image.title="Apache APISIX" -LABEL org.opencontainers.image.description="Cloudron package for Apache APISIX" -LABEL org.opencontainers.image.source="https://example.com" - -# Install OS dependencies here as needed -# RUN apt-get update && apt-get install -y --no-install-recommends \ -# curl ca-certificates tini \ -# && rm -rf /var/lib/apt/lists/* - -# App code lives in /app/code (read-only at runtime) -WORKDIR /app/code - -# Copy application code (adjust as needed) -# COPY . /app/code - -# Create persistent directory for application data -RUN mkdir -p /app/data && chown -R cloudron:cloudron /app/data - -# Copy startup script -COPY start.sh /app/pkg/start.sh -RUN chmod +x /app/pkg/start.sh && chown cloudron:cloudron /app/pkg/start.sh - -USER cloudron - -# Expose the app port specified in manifest -EXPOSE 9180 - -# Default environment (customize per app) -ENV NODE_ENV=production \ - APP_PORT=9180 - -HEALTHCHECK --interval=30s --timeout=5s --start-period=20s --retries=3 \ - CMD curl -fsS http://127.0.0.1:${APP_PORT}/ || exit 1 - -CMD ["/app/pkg/start.sh"] diff --git a/CloudronPackages/APISIX/README.md b/CloudronPackages/APISIX/README.md deleted file mode 100644 index 3800ea6..0000000 --- a/CloudronPackages/APISIX/README.md +++ /dev/null @@ -1,33 +0,0 @@ -# Package Template for Cloudron Apps - -This is a minimal template to package an application for Cloudron. - -## Docker Artifact Naming Convention - -All KNEL Cloudron packages follow the `KNELCloudron-` prefix convention: -- **Development Images**: `:dev` (built locally for testing) -- **Production Images**: `:latest` (final packaged versions) -- **Container Names**: Use descriptive names like `-dev` for development containers - -## Template Usage - -Replace placeholders in files with your app specifics: -- `io.knel.apisix` (e.g., com.example.myapp) -- `Apache APISIX` (human name) -- `9180` (default internal app port) -- `5.0.0` (Cloudron base image tag, e.g., 5.0.0) - -Files -- `CloudronManifest.json` – base manifest -- `Dockerfile` – uses cloudron/base, non-root user, healthcheck -- `start.sh` – startup script with addon detection examples -- `nginx.conf` (optional) – example reverse proxy -- `supervisord.conf` (optional) – process manager example -- `config.yaml` (optional) – sample app config -- `logo.png` – add your 512x512 PNG icon here (not provided in template) - -Usage -1. Create a new package from this template using `scripts/new-package.sh`: - `scripts/new-package.sh MyApp --id com.example.myapp --title "My App" --port 3000` -2. Adjust Dockerfile and start.sh to run your app. -3. Build and test locally; then commit and push. diff --git a/CloudronPackages/APISIX/config.yaml b/CloudronPackages/APISIX/config.yaml deleted file mode 100644 index 5577788..0000000 --- a/CloudronPackages/APISIX/config.yaml +++ /dev/null @@ -1,11 +0,0 @@ -# Example configuration template for Apache APISIX -server: - port: 9180 - -data: - dir: /app/data - -database: - # url: ${CLOUDRON_POSTGRESQL_URL} - # redis: ${CLOUDRON_REDIS_URL} - diff --git a/CloudronPackages/APISIX/nginx.conf b/CloudronPackages/APISIX/nginx.conf deleted file mode 100644 index 4959f69..0000000 --- a/CloudronPackages/APISIX/nginx.conf +++ /dev/null @@ -1,26 +0,0 @@ -user cloudron; -worker_processes auto; - -error_log /var/log/nginx/error.log warn; -pid /run/nginx.pid; - -events { worker_connections 1024; } - -http { - include /etc/nginx/mime.types; - default_type application/octet-stream; - access_log /var/log/nginx/access.log main; - sendfile on; - - server { - listen 9180; - server_name _; - - location / { - proxy_set_header Host $host; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_pass http://127.0.0.1:9180; - } - } -} - diff --git a/CloudronPackages/APISIX/start.sh b/CloudronPackages/APISIX/start.sh deleted file mode 100644 index 90663f0..0000000 --- a/CloudronPackages/APISIX/start.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -log() { echo "[start] $(date -Is) $*"; } -abort() { echo "[start] ERROR: $*" >&2; exit 1; } - -# Defaults -: "${APP_PORT:=9180}" - -log "Starting Apache APISIX on port ${APP_PORT}" - -# Example: ensure /app/data exists and is writable -mkdir -p /app/data -chown -R cloudron:cloudron /app/data || true - -# Example addon integration (uncomment and adapt as needed) -# if [[ -n "${CLOUDRON_POSTGRESQL_URL:-}" ]]; then -# log "Detected PostgreSQL addon" -# # Use $CLOUDRON_POSTGRESQL_* env vars -# fi - -# if [[ -n "${CLOUDRON_REDIS_URL:-}" ]]; then -# log "Detected Redis addon" -# fi - -# If your app needs config generation, do it here -# cat > /app/data/config.yaml <<'YAML' -# key: value -# YAML - -# Example: start a simple HTTP server (placeholder) -# Replace with your actual app start command -if command -v python3 >/dev/null 2>&1; then - log "Launching placeholder server: python3 -m http.server ${APP_PORT}" - exec python3 -m http.server "${APP_PORT}" --bind 0.0.0.0 -else - abort "No application command configured. Replace placeholder with your app's start command." -fi - diff --git a/CloudronPackages/APISIX/supervisord.conf b/CloudronPackages/APISIX/supervisord.conf deleted file mode 100644 index e73a12a..0000000 --- a/CloudronPackages/APISIX/supervisord.conf +++ /dev/null @@ -1,12 +0,0 @@ -[supervisord] -logfile=/var/log/supervisor/supervisord.log -pidfile=/run/supervisord.pid -nodaemon=true - -[program:app] -command=/app/pkg/start.sh -autorestart=true -stdout_logfile=/var/log/supervisor/app.stdout.log -stderr_logfile=/var/log/supervisor/app.stderr.log -user=cloudron - diff --git a/CloudronPackages/Jenkins/.dockerignore b/CloudronPackages/Jenkins/.dockerignore deleted file mode 100644 index 090ba8b..0000000 --- a/CloudronPackages/Jenkins/.dockerignore +++ /dev/null @@ -1,11 +0,0 @@ -# Ignore typical build context clutter -.git -.gitignore -node_modules -npm-debug.log -*.log -dist -build -Dockerfile.* -.DS_Store - diff --git a/CloudronPackages/Jenkins/CloudronManifest.json b/CloudronPackages/Jenkins/CloudronManifest.json deleted file mode 100644 index 1f1eff0..0000000 --- a/CloudronPackages/Jenkins/CloudronManifest.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "manifestVersion": 2, - "id": "io.knel.jenkins", - "title": "Jenkins CI/CD", - "author": "KNEL", - "description": "Cloudron packaging template for Jenkins CI/CD", - "website": "https://example.com", - "contactEmail": "admin@example.com", - "version": "0.1.0", - "changelog": "Initial package template", - "healthCheckPath": "/", - "httpPort": 8080, - "addons": { - "localstorage": {} - }, - "tags": ["template", "example"], - "icon": "logo.png" -} - diff --git a/CloudronPackages/Jenkins/Dockerfile b/CloudronPackages/Jenkins/Dockerfile deleted file mode 100644 index 95e19cd..0000000 --- a/CloudronPackages/Jenkins/Dockerfile +++ /dev/null @@ -1,58 +0,0 @@ -FROM cloudron/base:5.0.0 - -# Metadata labels -LABEL org.opencontainers.image.title="Jenkins CI/CD" -LABEL org.opencontainers.image.description="Cloudron package for Jenkins CI/CD Platform" -LABEL org.opencontainers.image.source="https://github.com/jenkinsci/jenkins" - -# Install Java and dependencies -RUN apt-get update && apt-get install -y --no-install-recommends \ - openjdk-17-jdk \ - curl \ - ca-certificates \ - git \ - && rm -rf /var/lib/apt/lists/* - -# Set Java environment -ENV JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64 -ENV PATH=$JAVA_HOME/bin:$PATH - -# Create Jenkins directories -RUN mkdir -p /app/data/jenkins_home && \ - mkdir -p /app/data/plugins && \ - mkdir -p /app/pkg && \ - chown -R cloudron:cloudron /app/data - -# Download Jenkins WAR file -ARG JENKINS_VERSION=2.450 -RUN cd /tmp && \ - curl -fsSL "https://get.jenkins.io/war/${JENKINS_VERSION}/jenkins.war" -o jenkins.war && \ - mv jenkins.war /app/pkg/jenkins.war && \ - chown cloudron:cloudron /app/pkg/jenkins.war - -# Copy startup script and manifest -COPY start.sh /app/pkg/start.sh -COPY CloudronManifest.json /app/pkg/CloudronManifest.json -COPY CloudronManifest.json /CloudronManifest.json - -# Set permissions -RUN chmod +x /app/pkg/start.sh && \ - chown cloudron:cloudron /app/pkg/start.sh /app/pkg/CloudronManifest.json /CloudronManifest.json - -# Switch to cloudron user -USER cloudron - -# Expose port -EXPOSE 8080 - -# Set environment variables -ENV JENKINS_HOME=/app/data/jenkins_home \ - JENKINS_OPTS="--httpPort=8080 --httpListenAddress=0.0.0.0" \ - APP_PORT=8080 - -# Health check -HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \ - CMD curl -fsS http://127.0.0.1:${APP_PORT}/login || exit 1 - -# Start Jenkins -CMD ["/app/pkg/start.sh"] \ No newline at end of file diff --git a/CloudronPackages/Jenkins/README.md b/CloudronPackages/Jenkins/README.md deleted file mode 100644 index 3ce754f..0000000 --- a/CloudronPackages/Jenkins/README.md +++ /dev/null @@ -1,33 +0,0 @@ -# Package Template for Cloudron Apps - -This is a minimal template to package an application for Cloudron. - -## Docker Artifact Naming Convention - -All KNEL Cloudron packages follow the `KNELCloudron-` prefix convention: -- **Development Images**: `:dev` (built locally for testing) -- **Production Images**: `:latest` (final packaged versions) -- **Container Names**: Use descriptive names like `-dev` for development containers - -## Template Usage - -Replace placeholders in files with your app specifics: -- `io.knel.jenkins` (e.g., com.example.myapp) -- `Jenkins CI/CD` (human name) -- `8080` (default internal app port) -- `5.0.0` (Cloudron base image tag, e.g., 5.0.0) - -Files -- `CloudronManifest.json` – base manifest -- `Dockerfile` – uses cloudron/base, non-root user, healthcheck -- `start.sh` – startup script with addon detection examples -- `nginx.conf` (optional) – example reverse proxy -- `supervisord.conf` (optional) – process manager example -- `config.yaml` (optional) – sample app config -- `logo.png` – add your 512x512 PNG icon here (not provided in template) - -Usage -1. Create a new package from this template using `scripts/new-package.sh`: - `scripts/new-package.sh MyApp --id com.example.myapp --title "My App" --port 3000` -2. Adjust Dockerfile and start.sh to run your app. -3. Build and test locally; then commit and push. diff --git a/CloudronPackages/Jenkins/config.yaml b/CloudronPackages/Jenkins/config.yaml deleted file mode 100644 index d1ee6cf..0000000 --- a/CloudronPackages/Jenkins/config.yaml +++ /dev/null @@ -1,11 +0,0 @@ -# Example configuration template for Jenkins CI/CD -server: - port: 8080 - -data: - dir: /app/data - -database: - # url: ${CLOUDRON_POSTGRESQL_URL} - # redis: ${CLOUDRON_REDIS_URL} - diff --git a/CloudronPackages/Jenkins/nginx.conf b/CloudronPackages/Jenkins/nginx.conf deleted file mode 100644 index 6bfb21a..0000000 --- a/CloudronPackages/Jenkins/nginx.conf +++ /dev/null @@ -1,26 +0,0 @@ -user cloudron; -worker_processes auto; - -error_log /var/log/nginx/error.log warn; -pid /run/nginx.pid; - -events { worker_connections 1024; } - -http { - include /etc/nginx/mime.types; - default_type application/octet-stream; - access_log /var/log/nginx/access.log main; - sendfile on; - - server { - listen 8080; - server_name _; - - location / { - proxy_set_header Host $host; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_pass http://127.0.0.1:8080; - } - } -} - diff --git a/CloudronPackages/Jenkins/start.sh b/CloudronPackages/Jenkins/start.sh deleted file mode 100644 index 71d3621..0000000 --- a/CloudronPackages/Jenkins/start.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -log() { echo "[start] $(date -Is) $*"; } -abort() { echo "[start] ERROR: $*" >&2; exit 1; } - -# Defaults -: "${APP_PORT:=8080}" -: "${JENKINS_HOME:=/app/data/jenkins_home}" - -log "Starting Jenkins CI/CD on port ${APP_PORT}" - -# Ensure Jenkins home directory exists and is writable -mkdir -p "${JENKINS_HOME}" -chown -R cloudron:cloudron /app/data || true - -# Set Jenkins environment variables -export JENKINS_HOME -export JENKINS_OPTS="--httpPort=${APP_PORT} --httpListenAddress=0.0.0.0" - -log "Starting Jenkins WAR file" -exec java -jar /app/pkg/jenkins.war \ No newline at end of file diff --git a/CloudronPackages/Jenkins/supervisord.conf b/CloudronPackages/Jenkins/supervisord.conf deleted file mode 100644 index e73a12a..0000000 --- a/CloudronPackages/Jenkins/supervisord.conf +++ /dev/null @@ -1,12 +0,0 @@ -[supervisord] -logfile=/var/log/supervisor/supervisord.log -pidfile=/run/supervisord.pid -nodaemon=true - -[program:app] -command=/app/pkg/start.sh -autorestart=true -stdout_logfile=/var/log/supervisor/app.stdout.log -stderr_logfile=/var/log/supervisor/app.stderr.log -user=cloudron - diff --git a/CloudronPackages/PackageTemplate/.dockerignore b/CloudronPackages/PackageTemplate/.dockerignore deleted file mode 100644 index 090ba8b..0000000 --- a/CloudronPackages/PackageTemplate/.dockerignore +++ /dev/null @@ -1,11 +0,0 @@ -# Ignore typical build context clutter -.git -.gitignore -node_modules -npm-debug.log -*.log -dist -build -Dockerfile.* -.DS_Store - diff --git a/CloudronPackages/PackageTemplate/CloudronManifest.json b/CloudronPackages/PackageTemplate/CloudronManifest.json deleted file mode 100644 index 7ee1a01..0000000 --- a/CloudronPackages/PackageTemplate/CloudronManifest.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "manifestVersion": 2, - "id": "__APP_ID__", - "title": "__APP_TITLE__", - "author": "KNEL", - "description": "Cloudron packaging template for __APP_TITLE__", - "website": "https://example.com", - "contactEmail": "admin@example.com", - "version": "0.1.0", - "changelog": "Initial package template", - "healthCheckPath": "/", - "httpPort": __HTTP_PORT__, - "addons": { - "localstorage": {} - }, - "tags": ["template", "example"], - "icon": "logo.png" -} - diff --git a/CloudronPackages/PackageTemplate/Dockerfile b/CloudronPackages/PackageTemplate/Dockerfile deleted file mode 100644 index e0f558b..0000000 --- a/CloudronPackages/PackageTemplate/Dockerfile +++ /dev/null @@ -1,38 +0,0 @@ -FROM cloudron/base:__CLOUDRON_BASE__ - -# Metadata labels (edit as needed) -LABEL org.opencontainers.image.title="__APP_TITLE__" -LABEL org.opencontainers.image.description="Cloudron package for __APP_TITLE__" -LABEL org.opencontainers.image.source="https://example.com" - -# Install OS dependencies here as needed -# RUN apt-get update && apt-get install -y --no-install-recommends \ -# curl ca-certificates tini \ -# && rm -rf /var/lib/apt/lists/* - -# App code lives in /app/code (read-only at runtime) -WORKDIR /app/code - -# Copy application code (adjust as needed) -# COPY . /app/code - -# Create persistent directory for application data -RUN mkdir -p /app/data && chown -R cloudron:cloudron /app/data - -# Copy startup script -COPY start.sh /app/pkg/start.sh -RUN chmod +x /app/pkg/start.sh && chown cloudron:cloudron /app/pkg/start.sh - -USER cloudron - -# Expose the app port specified in manifest -EXPOSE __HTTP_PORT__ - -# Default environment (customize per app) -ENV NODE_ENV=production \ - APP_PORT=__HTTP_PORT__ - -HEALTHCHECK --interval=30s --timeout=5s --start-period=20s --retries=3 \ - CMD curl -fsS http://127.0.0.1:${APP_PORT}/ || exit 1 - -CMD ["/app/pkg/start.sh"] diff --git a/CloudronPackages/PackageTemplate/README.md b/CloudronPackages/PackageTemplate/README.md deleted file mode 100644 index 702a40b..0000000 --- a/CloudronPackages/PackageTemplate/README.md +++ /dev/null @@ -1,24 +0,0 @@ -# Package Template for Cloudron Apps - -This is a minimal template to package an application for Cloudron. - -Replace placeholders in files with your app specifics: -- `__APP_ID__` (e.g., com.example.myapp) -- `__APP_TITLE__` (human name) -- `__HTTP_PORT__` (default internal app port) -- `__CLOUDRON_BASE__` (Cloudron base image tag, e.g., 5.0.0) - -Files -- `CloudronManifest.json` – base manifest -- `Dockerfile` – uses cloudron/base, non-root user, healthcheck -- `start.sh` – startup script with addon detection examples -- `nginx.conf` (optional) – example reverse proxy -- `supervisord.conf` (optional) – process manager example -- `config.yaml` (optional) – sample app config -- `logo.png` – add your 512x512 PNG icon here (not provided in template) - -Usage -1. Create a new package from this template using `scripts/new-package.sh`: - `scripts/new-package.sh MyApp --id com.example.myapp --title "My App" --port 3000` -2. Adjust Dockerfile and start.sh to run your app. -3. Build and test locally; then commit and push. diff --git a/CloudronPackages/PackageTemplate/config.yaml b/CloudronPackages/PackageTemplate/config.yaml deleted file mode 100644 index 445d0da..0000000 --- a/CloudronPackages/PackageTemplate/config.yaml +++ /dev/null @@ -1,11 +0,0 @@ -# Example configuration template for __APP_TITLE__ -server: - port: __HTTP_PORT__ - -data: - dir: /app/data - -database: - # url: ${CLOUDRON_POSTGRESQL_URL} - # redis: ${CLOUDRON_REDIS_URL} - diff --git a/CloudronPackages/PackageTemplate/nginx.conf b/CloudronPackages/PackageTemplate/nginx.conf deleted file mode 100644 index 25ebb29..0000000 --- a/CloudronPackages/PackageTemplate/nginx.conf +++ /dev/null @@ -1,26 +0,0 @@ -user cloudron; -worker_processes auto; - -error_log /var/log/nginx/error.log warn; -pid /run/nginx.pid; - -events { worker_connections 1024; } - -http { - include /etc/nginx/mime.types; - default_type application/octet-stream; - access_log /var/log/nginx/access.log main; - sendfile on; - - server { - listen __HTTP_PORT__; - server_name _; - - location / { - proxy_set_header Host $host; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_pass http://127.0.0.1:__HTTP_PORT__; - } - } -} - diff --git a/CloudronPackages/PackageTemplate/start.sh b/CloudronPackages/PackageTemplate/start.sh deleted file mode 100644 index 9f2e423..0000000 --- a/CloudronPackages/PackageTemplate/start.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -log() { echo "[start] $(date -Is) $*"; } -abort() { echo "[start] ERROR: $*" >&2; exit 1; } - -# Defaults -: "${APP_PORT:=__HTTP_PORT__}" - -log "Starting __APP_TITLE__ on port ${APP_PORT}" - -# Example: ensure /app/data exists and is writable -mkdir -p /app/data -chown -R cloudron:cloudron /app/data || true - -# Example addon integration (uncomment and adapt as needed) -# if [[ -n "${CLOUDRON_POSTGRESQL_URL:-}" ]]; then -# log "Detected PostgreSQL addon" -# # Use $CLOUDRON_POSTGRESQL_* env vars -# fi - -# if [[ -n "${CLOUDRON_REDIS_URL:-}" ]]; then -# log "Detected Redis addon" -# fi - -# If your app needs config generation, do it here -# cat > /app/data/config.yaml <<'YAML' -# key: value -# YAML - -# Example: start a simple HTTP server (placeholder) -# Replace with your actual app start command -if command -v python3 >/dev/null 2>&1; then - log "Launching placeholder server: python3 -m http.server ${APP_PORT}" - exec python3 -m http.server "${APP_PORT}" --bind 0.0.0.0 -else - abort "No application command configured. Replace placeholder with your app's start command." -fi - diff --git a/CloudronPackages/PackageTemplate/supervisord.conf b/CloudronPackages/PackageTemplate/supervisord.conf deleted file mode 100644 index e73a12a..0000000 --- a/CloudronPackages/PackageTemplate/supervisord.conf +++ /dev/null @@ -1,12 +0,0 @@ -[supervisord] -logfile=/var/log/supervisor/supervisord.log -pidfile=/run/supervisord.pid -nodaemon=true - -[program:app] -command=/app/pkg/start.sh -autorestart=true -stdout_logfile=/var/log/supervisor/app.stdout.log -stderr_logfile=/var/log/supervisor/app.stderr.log -user=cloudron - diff --git a/CloudronPackages/Rathole/.dockerignore b/CloudronPackages/Rathole/.dockerignore deleted file mode 100644 index d5efcff..0000000 --- a/CloudronPackages/Rathole/.dockerignore +++ /dev/null @@ -1,7 +0,0 @@ -.git -.gitignore -*.log -dist -build -.DS_Store - diff --git a/CloudronPackages/Rathole/CloudronManifest.json b/CloudronPackages/Rathole/CloudronManifest.json deleted file mode 100644 index 25b9387..0000000 --- a/CloudronPackages/Rathole/CloudronManifest.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "manifestVersion": 2, - "id": "io.knel.rathole", - "title": "Rathole", - "author": "KNEL", - "description": "A reverse proxy that enables secure tunnels between local services and the internet.", - "website": "https://github.com/rathole-org/rathole", - "contactEmail": "admin@knownelement.com", - "version": "0.1.0", - "changelog": "Initial Cloudron package (server/client configurable).", - "healthCheckPath": "/", - "httpPort": 3000, - "addons": { - "localstorage": {} - }, - "tags": ["network", "tunnel", "reverse-proxy"] -} - diff --git a/CloudronPackages/Rathole/Dockerfile b/CloudronPackages/Rathole/Dockerfile deleted file mode 100644 index 531c770..0000000 --- a/CloudronPackages/Rathole/Dockerfile +++ /dev/null @@ -1,41 +0,0 @@ -FROM cloudron/base:5.0.0 - -ARG RATHOLE_VERSION=v0.5.0 -ARG ARCH=x86_64-unknown-linux-gnu - -USER root -RUN apt-get update \ - && apt-get install -y --no-install-recommends curl ca-certificates tar python3 \ - && rm -rf /var/lib/apt/lists/* - -WORKDIR /app/pkg - -# Download Rathole release binary (adjust version/arch via build args) -RUN set -eux; \ - url="https://github.com/rathole-org/rathole/releases/download/${RATHOLE_VERSION}/rathole-${ARCH}.tar.gz"; \ - echo "Fetching ${url}"; \ - curl -fsSL "$url" -o rathole.tar.gz; \ - tar -xzf rathole.tar.gz; \ - rm rathole.tar.gz; \ - mv rathole /app/pkg/rathole; \ - chmod +x /app/pkg/rathole; \ - chown cloudron:cloudron /app/pkg/rathole - -# Start script -COPY start.sh /app/pkg/start.sh -RUN chmod +x /app/pkg/start.sh && chown cloudron:cloudron /app/pkg/start.sh - -WORKDIR /app/code -RUN mkdir -p /app/data && chown -R cloudron:cloudron /app/data - -USER cloudron - -ENV APP_PORT=3000 \ - RATHOLE_CONFIG_PATH=/app/data/rathole.toml - -EXPOSE 3000 2333 - -HEALTHCHECK --interval=30s --timeout=5s --start-period=20s --retries=3 \ - CMD curl -fsS http://127.0.0.1:${APP_PORT}/ || exit 1 - -CMD ["/app/pkg/start.sh"] diff --git a/CloudronPackages/Rathole/README.md b/CloudronPackages/Rathole/README.md deleted file mode 100644 index 2eba1e5..0000000 --- a/CloudronPackages/Rathole/README.md +++ /dev/null @@ -1,36 +0,0 @@ -# Rathole (Cloudron Package) - -Rathole is a reverse proxy that provides secure tunnels for local services. -Upstream project: https://github.com/rathole-org/rathole - -This Cloudron package runs Rathole and a lightweight HTTP health endpoint. - -## Defaults -- Mode: `server` (server-only package) -- Config path: `/app/data/rathole.toml` -- Health port: `3000` (Cloudron `httpPort`) - -## Configuration -- Put your Rathole TOML config at `/app/data/rathole.toml`, or provide it via the `RATHOLE_CONFIG` environment variable on first start. -- Example minimal server config is auto-generated if none exists. - -## Build (inside packaging container) -``` -scripts/packaging-up.sh -scripts/packaging-exec.sh "docker build -t rathole:dev CloudronPackages/Rathole" -``` - -## Run locally (inside packaging container) -``` -scripts/packaging-exec.sh "docker run --rm -p 3000:3000 -p 2333:2333 -v rathole-data:/app/data rathole:dev" -``` - -Note: expose additional service ports as needed per your TOML. Container exposes `2333` by default. - -## Deploy to Cloudron -Use Cloudron CLI from inside the packaging container: -``` -scripts/packaging-enter.sh -cloudron login -cloudron install --image rathole:dev -``` diff --git a/CloudronPackages/Rathole/start.sh b/CloudronPackages/Rathole/start.sh deleted file mode 100644 index c6dcf2a..0000000 --- a/CloudronPackages/Rathole/start.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -log() { echo "[rathole] $(date -Is) $*"; } -abort() { echo "[rathole] ERROR: $*" >&2; exit 1; } - -: "${APP_PORT:=3000}" -: "${RATHOLE_CONFIG_PATH:=/app/data/rathole.toml}" - -# Ensure data dir exists -mkdir -p /app/data -chown -R cloudron:cloudron /app/data || true - -# If RATHOLE_CONFIG is provided, write it to config path if file not present -if [[ ! -f "$RATHOLE_CONFIG_PATH" && -n "${RATHOLE_CONFIG:-}" ]]; then - log "Writing config from RATHOLE_CONFIG env to ${RATHOLE_CONFIG_PATH}" - printf "%s\n" "${RATHOLE_CONFIG}" > "$RATHOLE_CONFIG_PATH" -fi - -# If still no config, create a minimal example for server mode -if [[ ! -f "$RATHOLE_CONFIG_PATH" ]]; then - log "No config found. Writing a minimal example config (server). Adjust in /app/data/rathole.toml" - cat > "$RATHOLE_CONFIG_PATH" <<'TOML' -# Minimal Rathole server config example -[server] -bind_addr = "0.0.0.0:2333" - -# Define services below as needed, for example: -# [server.services.echo] -# type = "tcp" -# local_addr = "127.0.0.1:7" -TOML -fi - -# Background: lightweight HTTP health endpoint -python3 -m http.server "$APP_PORT" --bind 0.0.0.0 >/dev/null 2>&1 & -HEALTH_PID=$! -log "Started health endpoint on :${APP_PORT} (pid ${HEALTH_PID})" - -log "Launching rathole in server mode with config ${RATHOLE_CONFIG_PATH}" -exec /app/pkg/rathole server -c "$RATHOLE_CONFIG_PATH" diff --git a/CloudronPackages/Rundeck/.dockerignore b/CloudronPackages/Rundeck/.dockerignore deleted file mode 100644 index 090ba8b..0000000 --- a/CloudronPackages/Rundeck/.dockerignore +++ /dev/null @@ -1,11 +0,0 @@ -# Ignore typical build context clutter -.git -.gitignore -node_modules -npm-debug.log -*.log -dist -build -Dockerfile.* -.DS_Store - diff --git a/CloudronPackages/Rundeck/CloudronManifest.json b/CloudronPackages/Rundeck/CloudronManifest.json deleted file mode 100644 index a96fdc7..0000000 --- a/CloudronPackages/Rundeck/CloudronManifest.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "manifestVersion": 2, - "id": "io.knel.rundeck", - "title": "Rundeck Job Scheduler", - "author": "KNEL", - "description": "Cloudron packaging template for Rundeck Job Scheduler", - "website": "https://example.com", - "contactEmail": "admin@example.com", - "version": "0.1.0", - "changelog": "Initial package template", - "healthCheckPath": "/", - "httpPort": 4440, - "addons": { - "localstorage": {} - }, - "tags": ["template", "example"], - "icon": "logo.png" -} - diff --git a/CloudronPackages/Rundeck/Dockerfile b/CloudronPackages/Rundeck/Dockerfile deleted file mode 100644 index fe198b0..0000000 --- a/CloudronPackages/Rundeck/Dockerfile +++ /dev/null @@ -1,38 +0,0 @@ -FROM cloudron/base:5.0.0 - -# Metadata labels (edit as needed) -LABEL org.opencontainers.image.title="Rundeck Job Scheduler" -LABEL org.opencontainers.image.description="Cloudron package for Rundeck Job Scheduler" -LABEL org.opencontainers.image.source="https://example.com" - -# Install OS dependencies here as needed -# RUN apt-get update && apt-get install -y --no-install-recommends \ -# curl ca-certificates tini \ -# && rm -rf /var/lib/apt/lists/* - -# App code lives in /app/code (read-only at runtime) -WORKDIR /app/code - -# Copy application code (adjust as needed) -# COPY . /app/code - -# Create persistent directory for application data -RUN mkdir -p /app/data && chown -R cloudron:cloudron /app/data - -# Copy startup script -COPY start.sh /app/pkg/start.sh -RUN chmod +x /app/pkg/start.sh && chown cloudron:cloudron /app/pkg/start.sh - -USER cloudron - -# Expose the app port specified in manifest -EXPOSE 4440 - -# Default environment (customize per app) -ENV NODE_ENV=production \ - APP_PORT=4440 - -HEALTHCHECK --interval=30s --timeout=5s --start-period=20s --retries=3 \ - CMD curl -fsS http://127.0.0.1:${APP_PORT}/ || exit 1 - -CMD ["/app/pkg/start.sh"] diff --git a/CloudronPackages/Rundeck/README.md b/CloudronPackages/Rundeck/README.md deleted file mode 100644 index c217401..0000000 --- a/CloudronPackages/Rundeck/README.md +++ /dev/null @@ -1,33 +0,0 @@ -# Package Template for Cloudron Apps - -This is a minimal template to package an application for Cloudron. - -## Docker Artifact Naming Convention - -All KNEL Cloudron packages follow the `KNELCloudron-` prefix convention: -- **Development Images**: `:dev` (built locally for testing) -- **Production Images**: `:latest` (final packaged versions) -- **Container Names**: Use descriptive names like `-dev` for development containers - -## Template Usage - -Replace placeholders in files with your app specifics: -- `io.knel.rundeck` (e.g., com.example.myapp) -- `Rundeck Job Scheduler` (human name) -- `4440` (default internal app port) -- `5.0.0` (Cloudron base image tag, e.g., 5.0.0) - -Files -- `CloudronManifest.json` – base manifest -- `Dockerfile` – uses cloudron/base, non-root user, healthcheck -- `start.sh` – startup script with addon detection examples -- `nginx.conf` (optional) – example reverse proxy -- `supervisord.conf` (optional) – process manager example -- `config.yaml` (optional) – sample app config -- `logo.png` – add your 512x512 PNG icon here (not provided in template) - -Usage -1. Create a new package from this template using `scripts/new-package.sh`: - `scripts/new-package.sh MyApp --id com.example.myapp --title "My App" --port 3000` -2. Adjust Dockerfile and start.sh to run your app. -3. Build and test locally; then commit and push. diff --git a/CloudronPackages/Rundeck/config.yaml b/CloudronPackages/Rundeck/config.yaml deleted file mode 100644 index 1a4e70b..0000000 --- a/CloudronPackages/Rundeck/config.yaml +++ /dev/null @@ -1,11 +0,0 @@ -# Example configuration template for Rundeck Job Scheduler -server: - port: 4440 - -data: - dir: /app/data - -database: - # url: ${CLOUDRON_POSTGRESQL_URL} - # redis: ${CLOUDRON_REDIS_URL} - diff --git a/CloudronPackages/Rundeck/nginx.conf b/CloudronPackages/Rundeck/nginx.conf deleted file mode 100644 index 706d216..0000000 --- a/CloudronPackages/Rundeck/nginx.conf +++ /dev/null @@ -1,26 +0,0 @@ -user cloudron; -worker_processes auto; - -error_log /var/log/nginx/error.log warn; -pid /run/nginx.pid; - -events { worker_connections 1024; } - -http { - include /etc/nginx/mime.types; - default_type application/octet-stream; - access_log /var/log/nginx/access.log main; - sendfile on; - - server { - listen 4440; - server_name _; - - location / { - proxy_set_header Host $host; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_pass http://127.0.0.1:4440; - } - } -} - diff --git a/CloudronPackages/Rundeck/start.sh b/CloudronPackages/Rundeck/start.sh deleted file mode 100644 index 19ab137..0000000 --- a/CloudronPackages/Rundeck/start.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -log() { echo "[start] $(date -Is) $*"; } -abort() { echo "[start] ERROR: $*" >&2; exit 1; } - -# Defaults -: "${APP_PORT:=4440}" - -log "Starting Rundeck Job Scheduler on port ${APP_PORT}" - -# Example: ensure /app/data exists and is writable -mkdir -p /app/data -chown -R cloudron:cloudron /app/data || true - -# Example addon integration (uncomment and adapt as needed) -# if [[ -n "${CLOUDRON_POSTGRESQL_URL:-}" ]]; then -# log "Detected PostgreSQL addon" -# # Use $CLOUDRON_POSTGRESQL_* env vars -# fi - -# if [[ -n "${CLOUDRON_REDIS_URL:-}" ]]; then -# log "Detected Redis addon" -# fi - -# If your app needs config generation, do it here -# cat > /app/data/config.yaml <<'YAML' -# key: value -# YAML - -# Example: start a simple HTTP server (placeholder) -# Replace with your actual app start command -if command -v python3 >/dev/null 2>&1; then - log "Launching placeholder server: python3 -m http.server ${APP_PORT}" - exec python3 -m http.server "${APP_PORT}" --bind 0.0.0.0 -else - abort "No application command configured. Replace placeholder with your app's start command." -fi - diff --git a/CloudronPackages/Rundeck/supervisord.conf b/CloudronPackages/Rundeck/supervisord.conf deleted file mode 100644 index e73a12a..0000000 --- a/CloudronPackages/Rundeck/supervisord.conf +++ /dev/null @@ -1,12 +0,0 @@ -[supervisord] -logfile=/var/log/supervisor/supervisord.log -pidfile=/run/supervisord.pid -nodaemon=true - -[program:app] -command=/app/pkg/start.sh -autorestart=true -stdout_logfile=/var/log/supervisor/app.stdout.log -stderr_logfile=/var/log/supervisor/app.stderr.log -user=cloudron - diff --git a/CloudronPackages/SEED_PROMPT.md b/CloudronPackages/SEED_PROMPT.md new file mode 100644 index 0000000..f6ec627 --- /dev/null +++ b/CloudronPackages/SEED_PROMPT.md @@ -0,0 +1,84 @@ +Good afternoon. + +I need you to be an EXPERT LEVEL SENIOR ENGINEER in devops/sre/CLoudron/Docker. DO not be a junior. Do not make mistakes that you can avoid. I prefer you to go slower and make less mistakes because you think about things ok? + +You are hereby tasked to package up the 56 applications in this repository for Cloudron in the next 48 hours. These are absolutely production mission critical for me to make money from my ventures. These close out my private cloud gaps. We must get these done or I will lose my house. + +You are my authorized agent to handle this packaging work for me as accurately and quickly as possible. + +Start with doing a very deep orientation to the CloudronPackages directory tree. + +In the Workspace directory, please create a detailed plan file/status tracker/memory bank called TheSoverignCloud.md. + +This is the ONLY markdown file you may use for this entire weekend. It should have todo, lessons learned, best practices etc. Ask any questions you like , don't be shy. + +Put a Questions: YYYY-MM-DD HH:MM (use my local system time ok?) header and then list out your detailed questions and group them by sub section, I will edit inline +and let you know in chat. Once you have read my questions, ask any followups in another date/time stamped section. We MUST communicate exclusively via markdown files. + +The only thing chat should be used for (in terms of our talking) is to let each other know when a markdown file is ready for review. + +Lets go slow, think carefully. + + +I want you to be absolutely BRUTAL in your work, your self assessment / audit as you go, your planning, your review, your compliance with instructions / plan that you create ok? + + +Do your best woirk. Think defenisvely. Slow down. Start from first principles. Use web search to pull the latest CLoudron packaging information. In general be accurate first, validate and then be fast ok> + + +Be your own QA tester please. Bring up the containers/stack locally and smoke test. + +Do not tell me something is actually done when its not done. You must provide proof of completion for anything you say is complete. By proof, I mean logs, curl etc output. Hard proof. + +For any containers / images / networks / volumes etc docker artifacts you create on this machine for testing purpose, use KNELCloudronDev- prefix please. Then use the package name as a secondary part of the prefix. + +Also create and actively maintain AGENTS.md please. + +DO not deviate from the instructions in this file or the plan we create ok? + +Also, under no circumstances should anything be done directly on the host with the exception of + +git commands (also can use the tea command to interact with my gitea instance) +docker commands +awk/sed/grep/cat etc bash commands + +Any packaging work MUST be done in containers. + +Create a helper container with the cloudron bits. It should be based on Ubuntu 22.04 (or whatever version Cloudron is using as its base) + +My Cloudron instance is at https://my.knownelement.com +My cloudron builder service is at: https://cloudron-app-build.knownelement.com/ +My Cloudron registry service is at: https://cloudron-docker-registry.knownelement.com/ + +Please create a secret.txt file and .gitignore it . I will place CLoudron tokens in that file. + + +Generally the best results I've gotten from agentic AI is by using a directory called collab : + +collab/ + audit + questions + proposals + plans + prompts + +output/ + + +The collab directory is where we talk +The output directory is where you work + +Make sense? + + +Follow a wqrkflow of + +questions -> proposals -> plans -> prompts -> implementation + +Ask me any questions about the workflow if it isn't clear. + +We will package exactly ONE application at a time. + +Start with core technical infrastructure, then core business infrastrcutre, than other stuff. Keep TheSoverignCloud.md up to date at all times. + +Start with a plan, do not perform any implementation yet. I must be in the loop at all times and approve all actions, either single item or multiple items in a batch. diff --git a/CloudronPackages/Workspace/AGENTS.md b/CloudronPackages/Workspace/AGENTS.md new file mode 100644 index 0000000..8d94996 --- /dev/null +++ b/CloudronPackages/Workspace/AGENTS.md @@ -0,0 +1,104 @@ +# AI Agents - Cloudron Packaging Project + +**Purpose**: Document all AI agents, their roles, configurations, and interactions for this project + +--- + +## Active Agents + +### Agent: Claude Sonnet 4.5 (Cursor) +- **Role**: Senior DevOps/SRE Engineer - Cloudron Packaging Specialist +- **Activation Date**: 2025-10-17 14:30 +- **Primary Responsibilities**: + - Package 56 applications for Cloudron + - Maintain project documentation + - Create and test Cloudron packages + - Smoke test all implementations + - Provide proof of completion for all work + +- **Communication Protocol**: + - ALL communication via markdown files in Workspace/ or collab/ directories + - Chat ONLY used to notify when markdown files are ready for review + - No questions or substantive discussion in chat + +- **Operating Principles** (from SEED_PROMPT.md): + - Expert-level work (senior engineer, not junior) + - Accuracy over speed - think carefully before acting + - Defensive thinking from first principles + - Brutal self-assessment and compliance with instructions + - Act as own QA tester + - Provide hard proof (logs, curl output, etc.) for all completions + - Never claim completion without proof + +- **Workflow**: + - questions → proposals → plans → prompts → implementation + - One application at a time + - All work done in containers, not on host (except git, docker, bash commands) + - Use KNELCloudronDev-[package-name] prefix for all Docker artifacts + +- **Constraints**: + - Must not deviate from SEED_PROMPT.md instructions or approved plans + - Must update TheSoverignCloud.md continuously + - Must follow questions/proposals/plans/prompts/implementation workflow + - Must wait for approval before implementation + +- **Current Task**: Initial planning and question gathering +- **Current Status**: Awaiting user answers to questions in TheSoverignCloud.md + +--- + +## Agent Interactions Log + +### 2025-10-17 14:30 - Initial Engagement +- **Event**: Agent activated and provided SEED_PROMPT.md +- **Agent Action**: Failed initial communication protocol (used chat instead of markdown) +- **Corrective Action**: Created TheSoverignCloud.md and AGENTS.md per instructions +- **Lesson Learned**: MUST communicate via markdown files only, chat only for notifications + +--- + +## Configuration & Context + +### Key Project Files +- **SEED_PROMPT.md**: Master instructions and requirements +- **TheSoverignCloud.md**: Central planning, status tracking, questions, lessons learned +- **AGENTS.md**: This file - agent documentation +- **PackageList.txt**: All 56 applications to package with priorities + +### Environment Configuration +- **Working Directory**: `/home/localuser/TSYSPublic/ChiefOperationsOfficer/VpTechops/KNELProductionContainers/CloudronPackages` +- **Container Prefix**: KNELCloudronDev- +- **Cloudron Instance**: https://my.knownelement.com +- **Builder Service**: https://cloudron-app-build.knownelement.com/ +- **Registry Service**: https://cloudron-docker-registry.knownelement.com/ + +### Agent Capabilities +- File operations (read, write, search) +- Terminal command execution +- Docker operations +- Git operations +- Web search for latest Cloudron documentation +- Code analysis and generation +- Testing and validation + +--- + +## Prompt Templates + +*This section will be populated with reusable prompt templates as we establish patterns* + +--- + +## Performance Metrics + +*This section will track agent performance and efficiency* + +- **Applications Packaged**: 0/56 +- **Success Rate**: N/A +- **Average Time per Package**: N/A +- **Errors/Rework Required**: 1 (initial communication protocol failure) + +--- + +*Last Updated: 2025-10-17 14:30* + diff --git a/CloudronPackages/Workspace/Dockerfile.helper b/CloudronPackages/Workspace/Dockerfile.helper new file mode 100644 index 0000000..abfca6b --- /dev/null +++ b/CloudronPackages/Workspace/Dockerfile.helper @@ -0,0 +1,52 @@ +# Cloudron Packaging Helper Container +# Based on Ubuntu 22.04 as requested +FROM ubuntu:22.04 + +# Set environment variables +ENV DEBIAN_FRONTEND=noninteractive +ENV TZ=UTC + +# Install system dependencies +RUN apt-get update && apt-get install -y \ + curl \ + wget \ + git \ + docker.io \ + docker-compose \ + jq \ + vim \ + nano \ + build-essential \ + python3 \ + python3-pip \ + nodejs \ + npm \ + golang-go \ + && rm -rf /var/lib/apt/lists/* + +# Install yq separately +RUN wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 && \ + chmod +x /usr/local/bin/yq + +# Install Cloudron CLI tools +# Note: These may need to be updated based on latest Cloudron documentation +RUN curl -fsSL https://cloudron.io/cloudron-cli/install.sh | bash + +# Create workspace directory +WORKDIR /workspace + +# Copy the entire CloudronPackages directory +COPY . /workspace/ + +# Set up git configuration (will be overridden by user's config) +RUN git config --global user.name "Cloudron Packager" && \ + git config --global user.email "packager@cloudron.local" + +# Create directories for package development +RUN mkdir -p /workspace/packages /workspace/temp + +# Set working directory to the main project +WORKDIR /workspace + +# Default command +CMD ["/bin/bash"] diff --git a/CloudronPackages/Workspace/PackageList.txt b/CloudronPackages/Workspace/PackageList.txt new file mode 100644 index 0000000..813ccaf --- /dev/null +++ b/CloudronPackages/Workspace/PackageList.txt @@ -0,0 +1,56 @@ +https://github.com/apache/apisix.git +https://github.com/jenkinsci/jenkins.git +https://github.com/rundeck/rundeck.git +https://github.com/SigNoz/signoz.git +https://github.com/netbox-community/netbox-docker.git +https://github.com/juspay/hyperswitch +https://github.com/gristlabs/grist-core +https://github.com/inventree/InvenTree.git +https://github.com/consuldemocracy/consuldemocracy.git +https://github.com/reviewboard/reviewboard.git +https://github.com/healthchecks/healthchecks.git +https://github.com/fleetdm/fleet.git +https://github.com/huginn/huginn.git +https://github.com/windmill-labs/windmill.git +https://github.com/target/goalert.git +https://github.com/datahub-project/datahub.git +https://github.com/elabftw/elabftw.git +https://github.com/jhpyle/docassemble.git +https://github.com/killbill/killbill.git +https://github.com/openboxes/openboxes-docker.git +https://github.com/rathole-org/rathole.git +https://github.com/fonoster/fonoster.git +https://github.com/chirpstack/chirpstack.git +https://github.com/wiredlush/easy-gate.git +https://github.com/GemGeorge/SniperPhish-Docker.git +https://github.com/SchedMD/slurm.git +https://github.com/giovtorres/slurm-docker-cluster.git +https://github.com/runmedev/runme.git +https://github.com/apache/seatunnel +https://github.com/thecatlady/docker-webhook +https://github.com/Cloud-RF/tak-server +https://github.com/midday-ai/midday.git +https://github.com/CraigChat/craig.git +https://github.com/jamovi/jamovi.git +https://github.com/INTI-CMNB/KiBot.git +https://github.com/Resgrid/Core +https://gitlab.com/librespacefoundation/satnogs/docker-kaitai.git +https://gitlab.com/librespacefoundation/satnogs/docker-satnogs-webgui.git +https://github.com/f4exb/sdrangel-docker +https://github.com/sebo-b/warp.git +https://github.com/jgraph/docker-drawio +https://github.com/openblocks-dev/openblocks.git +https://github.com/wireviz/wireviz-web.git +https://github.com/opulo-inc/autobom.git +https://github.com/PLMore/PLMore +https://github.com/manyfold3d/manyfold.git +https://github.com/langfuse/oss-llmops-stack.git +https://github.com/HeyPuter/puter.git +https://github.com/sbabic/swupdate.git +https://github.com/mendersoftware/mender-server.git +https://github.com/vanila-io/wireflow.git +https://github.com/nautechsystems/nautilus_trader.git +https://github.com/openfiletax/openfile.git +https://github.com/kazhuravlev/database-gateway.git +https://github.com/Payroll-Engine/PayrollEngine.git +https://github.com/funmusicplace/mirlo.git \ No newline at end of file diff --git a/PackagingForCloudronWorkspace/README.md b/CloudronPackages/Workspace/README.md similarity index 100% rename from PackagingForCloudronWorkspace/README.md rename to CloudronPackages/Workspace/README.md diff --git a/CloudronPackages/Workspace/TheSoverignCloud.md b/CloudronPackages/Workspace/TheSoverignCloud.md new file mode 100644 index 0000000..cd8af0a --- /dev/null +++ b/CloudronPackages/Workspace/TheSoverignCloud.md @@ -0,0 +1,347 @@ +# The Sovereign Cloud - Cloudron Packaging Project + +**Mission**: Package 56 production-critical applications for Cloudron within 48 hours + +**Status**: Initial Planning Phase + +--- + +## Questions: 2025-10-17 14:30 + +### Authentication & Access +1. Do you currently have the Cloudron API token/credentials ready to place in `secret.txt`, or should I wait for you to provide them? + +Yes I do. I have an api key from the super admin account. I also have a token from the cloudron builder service. + +This host has performed a succesful docker login to cloudron-docker-registry.knownelement.com. + +Also the builder service is configured to use cloudron-docker-registry.knownelement.com. + +2. Should I verify connectivity to https://my.knownelement.com and https://cloudron-app-build.knownelement.com/ before proceeding? + +Sure. + +### Application Prioritization +3. PackageList.txt shows 56 applications in Tiers A-E. Should I start with apisix (first in Tier A - API Gateway), or do you want to specify a different starting application? + +Please remove everything from that file except for the URLs. + +Go ahead and pick your own order of packaging based on what you think is most important in terms of core technical and business infrastructure. + +4. Would you prefer I start with a simpler application first to establish and validate the workflow before tackling critical infrastructure? + +Yes. Lets do rathole and then inventree. I think those are good representative samples. + +### Existing Work Assessment +5. I see several applications already cloned in Workspace/Docker/ (apisix, grist-core, hyperswitch, InvenTree, jenkins, killbill, openboxes, PayrollEngine, rundeck). Have you already attempted any packaging work that I should audit first? +6. Are there any existing CloudronManifest.json files or Dockerfiles I should review? + +Start from scratch please. I blew all of that away. Be advised that Workspace/Docker is where git clones from upstream happen and should serve as input material. Please use CloudronPackages/Packages for actual cloudron package bits. + +### Development Environment +7. For the helper container with Cloudron bits (Ubuntu 22.04 base): Do you want me to research and create the Dockerfile/build instructions, or do you have specific requirements/existing setup? + +I leave it to you. + +8. Should the helper container include specific Cloudron CLI tools? Which versions? + +Whatever works? I don't have any specific needs + +9. What should be mounted into the helper container? (I assume the entire CloudronPackages directory at minimum) + +Yes , I think that should cover it. + + +### Workflow & Structure +10. You mentioned using collab/ (audit, questions, proposals, plans, prompts) and output/ directories. Should I create this structure, or only TheSoverignCloud.md and AGENTS.md as mentioned in lines 11 and 35? +11. If using collab/ structure: Should TheSoverignCloud.md live in collab/ or Workspace/? +12. What should go in AGENTS.md? (Documentation of AI agents used, their roles, prompts, etc.?) + +For now, lets try just AGENTS.md and TheSoverignCloud.md and see how that works for the two test packages? + +### Technical Research Needs +13. Should I perform web research on latest Cloudron packaging standards before creating the detailed plan? +Yes + +14. Do you have any existing Cloudron packages you've created that I should study as reference implementations? +No + +15. Are there specific Cloudron base images or addons I should be aware of? + +Not that i'm aware of + +### Approval & Communication Workflow +16. After you answer these questions inline, should I then create a detailed proposal document (in collab/proposals/) before creating the implementation plan? +17. For the questions -> proposals -> plans -> prompts -> implementation workflow: Should each stage have its own timestamped markdown file? +18. When I complete a stage (e.g., questions answered), should I notify you in chat that the next document is ready? + +Lets table 16/17/18 for now, we can come back to it if we need it. This project may be contained enough, and this file (as it is and as it will be updated by me and you) may be sufficient for successful outcomes (working installs of new packages on Cloudron) + +### Secret Management +19. Should I create the secret.txt file now with placeholder comments, or wait for you to create it? + +Yes please + +20. What secrets beyond Cloudron tokens will be needed? (Docker registry credentials, Git tokens, etc.?) + +I don't think anything else will go in it. i already have ssh keys setup and tea is logged in to gitea already and docker login has been done to the cloudron registry. + + +### Testing & Validation +21. For smoke testing: What constitutes "proof of completion"? (Container starts, health check passes, specific functionality works, Cloudron install succeeds?) + +Yes all of that. + +Pass 1: The whole stack (app/web/db/worker whatever) comes up on my workstation and I can access it at localhost:12000 (use that port for all the testing on my workstation ok?). YOu will tell me to test and wait for me to give you feedback. +Pass 2: Cloudron install succeeds + + +22. Should I document the smoke test procedure for each application in a standardized format? + +Sure + +### Repository Management +23. I see Packages/ directory is empty. Should packaged applications go there with structure like Packages/[AppName]/CloudronManifest.json? + +Yes. Use AppName and put all the bits for each app in the AppName sub directory exactly + +24. Should I create a standardized directory structure for each package? + +Sure. Deviate as needed, but i feel they will have much overlap. + + +--- + +## Status Tracker + +### Applications to Package (56 Total) + +#### Tier A: Critical Infrastructure (5 apps) +- [ ] apisix - API Gateway (Issue #179) +- [ ] jenkins - CI/CD Platform (Issue #234) +- [ ] rundeck - Job Scheduler/Automation (Issue #217) +- [ ] signoz - Observability Platform (Issue #221) +- [ ] netbox-docker - Network Documentation (Issue #201) + +#### Tier B: Core Business Services (7 apps) +- [ ] hyperswitch - Payment Infrastructure (Issue #209) +- [ ] grist-core - Database/Spreadsheet (Issue #191) +- [ ] InvenTree - Inventory Management (Issue #173) +- [ ] consuldemocracy - Democracy Platform (Issue #189) +- [ ] reviewboard - Code Review (Issue #216) +- [ ] healthchecks - Monitoring (Issue #192) +- [ ] fleet - Device Management (Issue #195) + +#### Tier C: Development & Automation Tools (6 apps) +- [ ] huginn - Web Automation (Issue #194) +- [ ] windmill - Workflow Automation (Issue #285) +- [ ] goalert - On-Call Management (Issue #204) +- [ ] datahub - Data Catalog (Issue #309) +- [ ] elabftw - Lab Management (Issue #188) +- [ ] docassemble - Document Assembly (Issue #277) + +#### Tier D: Specialized Infrastructure (7 apps) +- [ ] killbill - Billing Platform (Issue #181) +- [ ] openboxes-docker - Supply Chain (Issue #205) +- [ ] rathole - Tunneling (Issue #225) +- [ ] fonoster - Telephony (Issue #227) +- [ ] chirpstack - LoRaWAN Server (Issue #184) +- [ ] easy-gate - Access Control (Issue #54) +- [ ] SniperPhish-Docker - Phishing Simulation (Issue #211) + +#### Tier E: Remaining Applications (31 apps) +- [ ] slurm - HPC Job Scheduler (Issue #222) +- [ ] runme - Development Environment (Issue #322) +- [ ] seatunnel - Data Processing (Issue #301) +- [ ] docker-webhook - Webhook Handler (Issue #271) +- [ ] tak-server - TAK Server (Issue #180) +- [ ] midday - AI Assistant (Issue #178) +- [ ] craig - Chat Platform (Issue #185) +- [ ] jamovi - Statistical Analysis (Issue #196) +- [ ] KiBot - PCB Design (Issue #197) +- [ ] Resgrid Core - Emergency Management (Issue #214) +- [ ] satnogs - Satellite Ground Station (Issue #218) +- [ ] sdrangel-docker - SDR Software (Issue #219) +- [ ] warp - File Sharing (Issue #228) +- [ ] docker-drawio - Diagram Tool (Issue #272) +- [ ] openblocks - Low-Code Platform (Issue #274) +- [ ] wireviz-web - Network Documentation (Issue #276) +- [ ] autobom - BOM Management (Issue #278) +- [ ] PLMore - Project Management (Issue #279) +- [ ] manyfold - 3D Modeling (Issue #282) +- [ ] oss-llmops-stack - LLM Ops Stack (Issue #283) +- [ ] puter - Cloud Desktop (Issue #286) +- [ ] swupdate - Firmware Updates (Issue #326) +- [ ] mender-server - IoT Device Management (Issue #300) +- [ ] wireflow - Wireframing (Issue #50) +- [ ] nautilus_trader - Trading Platform (Issue #226) +- [ ] openfile - Tax Filing (Issue #316) +- [ ] database-gateway - Database Gateway (Issue #273) +- [ ] PayrollEngine - Payroll Engine (Issue #208) +- [ ] mirlo - Music Platform (TBD) + +--- + +## Lessons Learned + +*This section will be populated as we progress through packaging applications* + +--- + +## Best Practices + +*This section will be populated as we establish proven patterns* + +--- + +## Technical Notes + +### Current Environment +- Workspace: `/home/localuser/TSYSPublic/ChiefOperationsOfficer/VpTechops/KNELProductionContainers/CloudronPackages` +- Cloudron Instance: https://my.knownelement.com +- Builder Service: https://cloudron-app-build.knownelement.com/ +- Docker Registry: https://cloudron-docker-registry.knownelement.com/ + +### Upstream Sources Status +- Location: `Workspace/Docker/` +- Currently Cloned: apisix, grist-core, hyperswitch, InvenTree, jenkins, jenkins-docker, killbill, openboxes, openboxes-docker, PayrollEngine, rundeck +- Remaining to Clone: 45+ applications + +### Naming Convention +All Docker artifacts for testing: `KNELCloudronDev-[package-name]-[artifact-type]` + +--- + +## Next Steps + +### Completed Actions: +1. ✅ **Clean PackageList.txt** - Removed everything except URLs +2. ✅ **Create secret.txt** - Created with placeholder comments for Cloudron tokens +3. ✅ **Create helper container Dockerfile** - Created Dockerfile.helper with Ubuntu 22.04 base +4. 🔄 **Research Cloudron packaging standards** - In progress (limited web search results) + +### Immediate Next Actions: +1. **Build helper container** and test it +2. **Start with rathole** as first test package +3. **Follow with InvenTree** as second test package + +### Test Package Plan: + +#### Package 1: rathole (Tunneling - Issue #225) +- **Repository**: https://github.com/rathole-org/rathole.git +- **Type**: Network tunneling tool (no auth) +- **Complexity**: Low (good for workflow validation) +- **Port**: 12000 (as specified) +- **Dependencies**: Minimal + +#### Package 2: InvenTree (Inventory Management - Issue #173) +- **Repository**: https://github.com/inventree/InvenTree.git +- **Type**: Web application with database +- **Complexity**: Medium (good for testing database integration) +- **Port**: 12000 (as specified) +- **Dependencies**: PostgreSQL, Redis (likely) + +### Cloudron Packaging Structure: +``` +Packages/[AppName]/ +├── CloudronManifest.json +├── Dockerfile +├── README.md +└── (other app-specific files) +``` + +### Testing Protocol: +1. **Pass 1**: Local testing on localhost:12000 + - Container starts successfully + - Health check passes + - Application accessible via browser + - User provides feedback +2. **Pass 2**: Cloudron installation + - Package uploads to Cloudron + - Installation succeeds + - Application accessible via Cloudron + +## Implementation Plan: rathole Package + +### Phase 1: Environment Setup +1. **Build helper container**: + ```bash + docker build -f Dockerfile.helper -t KNELCloudronDev-helper . + ``` +2. **Start helper container**: + ```bash + docker run -it --name KNELCloudronDev-helper-container \ + -v $(pwd):/workspace \ + -p 12000:12000 \ + KNELCloudronDev-helper + ``` + +### Phase 2: rathole Package Development +1. **Clone rathole repository**: + ```bash + cd /workspace/Workspace/Docker + git clone https://github.com/rathole-org/rathole.git + ``` +2. **Analyze rathole structure**: + - Review existing Dockerfile (if any) + - Identify dependencies and configuration + - Determine port requirements +3. **Create Cloudron package structure**: + ``` + Packages/rathole/ + ├── CloudronManifest.json + ├── Dockerfile + ├── README.md + └── config/ (if needed) + ``` +4. **Create CloudronManifest.json**: + - Define app metadata + - Set port configuration (12000) + - Configure health checks +5. **Create optimized Dockerfile**: + - Based on rathole's requirements + - Cloudron-compatible + - Health check enabled + +### Phase 3: Local Testing +1. **Build rathole package**: + ```bash + cd Packages/rathole + docker build -t KNELCloudronDev-rathole . + ``` +2. **Test locally**: + ```bash + docker run -d --name KNELCloudronDev-rathole-test \ + -p 12000:12000 \ + KNELCloudronDev-rathole + ``` +3. **Verify functionality**: + - Check container logs + - Test port accessibility + - Validate health endpoint +4. **User testing**: Wait for user feedback on localhost:12000 + +### Phase 4: Cloudron Integration +1. **Package for Cloudron**: + - Create package archive + - Validate CloudronManifest.json +2. **Upload to Cloudron**: + - Use Cloudron CLI tools + - Test installation process +3. **Verify Cloudron deployment**: + - Confirm successful installation + - Test application access via Cloudron + +### Phase 5: Documentation & Cleanup +1. **Update TheSoverignCloud.md** with lessons learned +2. **Document rathole-specific patterns** for reuse +3. **Clean up test containers**: + ```bash + docker rm KNELCloudronDev-rathole-test + docker rmi KNELCloudronDev-rathole + ``` + +--- + +*Last Updated: 2025-10-17 15:15* + diff --git a/CloudronPackages/Workspace/manage-repos.sh b/CloudronPackages/Workspace/manage-repos.sh new file mode 100755 index 0000000..922cf55 --- /dev/null +++ b/CloudronPackages/Workspace/manage-repos.sh @@ -0,0 +1,182 @@ +#!/bin/bash + +# Ship The Sovereign Cloud - Repository Management Script +# Manages upstream repository cloning and updating for Cloudron packaging +# Runs on HOST (not in container) - uses host git commands + +set -euo pipefail + +# Script configuration +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +PACKAGE_LIST="${SCRIPT_DIR}/PackageList.txt" +TARGET_DIR="${SCRIPT_DIR}/Docker" +WORKSPACE_ROOT="$(cd "${SCRIPT_DIR}/.." && pwd)" + +# Colors for output +RED='\033[0;31m' +GREEN='\033[0;32m' +YELLOW='\033[1;33m' +BLUE='\033[0;34m' +NC='\033[0m' # No Color + +# Logging functions +log_info() { + echo -e "${BLUE}[INFO]${NC} $1" +} + +log_success() { + echo -e "${GREEN}[SUCCESS]${NC} $1" +} + +log_warning() { + echo -e "${YELLOW}[WARNING]${NC} $1" +} + +log_error() { + echo -e "${RED}[ERROR]${NC} $1" +} + +# Check prerequisites +check_prerequisites() { + log_info "Checking prerequisites..." + + if ! command -v git &> /dev/null; then + log_error "git is not installed or not in PATH" + exit 1 + fi + + if [[ ! -f "$PACKAGE_LIST" ]]; then + log_error "PackageList.txt not found at: $PACKAGE_LIST" + exit 1 + fi + + log_success "Prerequisites check passed" +} + +# Create target directory +setup_workspace() { + log_info "Setting up workspace..." + mkdir -p "$TARGET_DIR" + log_success "Workspace ready at: $TARGET_DIR" +} + +# Extract repository URLs from PackageList.txt +get_repo_urls() { + # Extract URLs, ignoring comments and empty lines + grep -v '^#' "$PACKAGE_LIST" | grep -v '^$' | grep -v '^[[:space:]]*$' || true +} + +# Clone or update a single repository +manage_single_repo() { + local repo_url="$1" + local repo_name + local repo_path + + # Extract repository name from URL + repo_name=$(basename "$repo_url" .git) + repo_path="$TARGET_DIR/$repo_name" + + log_info "Processing: $repo_name" + + if [[ -d "$repo_path/.git" ]]; then + # Repository exists, update it + log_info "Updating existing repository: $repo_name" + cd "$repo_path" + + # Fetch latest changes + if git fetch --all --prune; then + # Try to fast-forward merge + if git pull --ff-only; then + log_success "Updated: $repo_name" + else + log_warning "Could not fast-forward $repo_name (may have local changes)" + log_info "Repository $repo_name is up to date but has diverged" + fi + else + log_warning "Failed to fetch updates for $repo_name" + fi + else + # Repository doesn't exist, clone it + log_info "Cloning new repository: $repo_name" + cd "$TARGET_DIR" + + if git clone --depth 1 "$repo_url" "$repo_name"; then + log_success "Cloned: $repo_name" + else + log_error "Failed to clone: $repo_url" + return 1 + fi + fi +} + +# Main execution function +main() { + log_info "Ship The Sovereign Cloud - Repository Manager" + log_info "==============================================" + + check_prerequisites + setup_workspace + + # Get all repository URLs + local repo_urls + mapfile -t repo_urls < <(get_repo_urls) + + if [[ ${#repo_urls[@]} -eq 0 ]]; then + log_warning "No repositories found in PackageList.txt" + exit 0 + fi + + log_info "Found ${#repo_urls[@]} repositories to manage" + + # Process each repository + local success_count=0 + local error_count=0 + + for repo_url in "${repo_urls[@]}"; do + if [[ -n "$repo_url" ]]; then + if manage_single_repo "$repo_url"; then + ((success_count++)) + else + ((error_count++)) + fi + fi + done + + # Summary + log_info "==============================================" + log_info "Repository management complete" + log_success "Successfully processed: $success_count" + if [[ $error_count -gt 0 ]]; then + log_error "Failed: $error_count" + fi + log_info "Total repositories: ${#repo_urls[@]}" + + # Show workspace status + log_info "Workspace location: $TARGET_DIR" + log_info "Repository count: $(find "$TARGET_DIR" -maxdepth 1 -type d -name ".git" | wc -l)" +} + +# Handle script arguments +case "${1:-}" in + "help"|"-h"|"--help") + echo "Ship The Sovereign Cloud - Repository Manager" + echo "" + echo "Usage: $0 [command]" + echo "" + echo "Commands:" + echo " (no args) - Clone missing repos and update existing ones" + echo " help - Show this help message" + echo "" + echo "This script reads from PackageList.txt and manages repositories" + echo "in the Docker/ subdirectory." + exit 0 + ;; + "") + main + ;; + *) + log_error "Unknown command: $1" + log_info "Use '$0 help' for usage information" + exit 1 + ;; +esac diff --git a/CloudronPackages/secret.txt b/CloudronPackages/secret.txt new file mode 100644 index 0000000..56e00f7 --- /dev/null +++ b/CloudronPackages/secret.txt @@ -0,0 +1,11 @@ +# Cloudron API Credentials +# Place your Cloudron API tokens here + +# Cloudron API Key (from super admin account) +CLOUDRON_API_KEY=your_api_key_here + +# Cloudron Builder Service Token +CLOUDRON_BUILDER_TOKEN=your_builder_token_here + +# Note: This file is gitignored for security +# Replace the placeholder values with actual tokens before use diff --git a/PackagingForCloudronWorkspace/UpstreamVendor-Clone.sh b/PackagingForCloudronWorkspace/UpstreamVendor-Clone.sh deleted file mode 100755 index c01e79e..0000000 --- a/PackagingForCloudronWorkspace/UpstreamVendor-Clone.sh +++ /dev/null @@ -1,229 +0,0 @@ -#!/bin/bash - -export PS4='(${BASH_SOURCE}:${LINENO}): - [${SHLVL},${BASH_SUBSHELL},$?] $ ' - -function error_out() -{ - echo "Bailing out. See above for reason...." - exit 1 -} - -function handle_failure() { - local lineno=$1 - local fn=$2 - local exitstatus=$3 - local msg=$4 - local lineno_fns=${0% 0} - if [[ "$lineno_fns" != "-1" ]] ; then - lineno="${lineno} ${lineno_fns}" - fi - echo "${BASH_SOURCE[0]}: Function: ${fn} Line Number : [${lineno}] Failed with status ${exitstatus}: $msg" -} - -trap 'handle_failure "${BASH_LINENO[*]}" "$LINENO" "${FUNCNAME[*]:-script}" "$?" "$BASH_COMMAND"' ERR - -set -o errexit -set -o nounset -set -o pipefail -set -o functrace - - -export GIT_REPO_LIST -GIT_REPO_LIST=( - -#################### -# Vp techops stuff -#################### - -#https://projects.knownelement.com/issues/179 -https://github.com/apache/apisix.git - -#https://projects.knownelement.com/issues/204 -https://github.com/target/goalert.git - -#https://projects.knownelement.com/issues/189 -https://github.com/consuldemocracy/consuldemocracy.git - -#https://projects.knownelement.com/issues/195 -https://github.com/fleetdm/fleet.git - -#https://projects.knownelement.com/issues/227 -https://github.com/fonoster/fonoster.git - -#https://projects.knownelement.com/issues/192 -https://github.com/healthchecks/healthchecks.git - -#https://projects.knownelement.com/issues/209 -https://github.com/juspay/hyperswitch - -#https://projects.knownelement.com/issues/201 -https://github.com/netbox-community/netbox-docker.git - -# https://projects.knownelement.com/issues/205 -https://github.com/openboxes/openboxes-docker.git - -#https://projects.knownelement.com/issues/316 -https://github.com/openfiletax/openfile.git - -#https://projects.knownelement.com/issues/211 -https://github.com/GemGeorge/SniperPhish-Docker.git - -#https://projects.knownelement.com/issues/309 -https://github.com/datahub-project/datahub.git - -#https://projects.knownelement.com/issues/54 -https://github.com/wiredlush/easy-gate.git - -#https://projects.knownelement.com/issues/208 -https://github.com/Payroll-Engine/PayrollEngine.git - -#https://projects.knownelement.com/issues/194 -https://github.com/huginn/huginn.git - -#https://projects.knownelement.com/issues/191 -https://github.com/gristlabs/grist-core - -#https://projects.knownelement.com/issues/277 -https://github.com/jhpyle/docassemble.git - -#https://projects.knownelement.com/issues/273 -https://github.com/kazhuravlev/database-gateway.git - -#https://projects.knownelement.com/issues/217 -https://github.com/rundeck/rundeck.git - -#https://projects.knownelement.com/issues/222 -https://github.com/SchedMD/slurm.git -https://github.com/giovtorres/slurm-docker-cluster.git - -#https://projects.knownelement.com/issues/225 -https://github.com/rathole-org/rathole.git - -#https://projects.knownelement.com/issues/234 -https://github.com/jenkinsci/jenkins.git - -#https://projects.knownelement.com/issues/322 -https://github.com/runmedev/runme.git - -#https://projects.knownelement.com/issues/301 -https://github.com/apache/seatunnel - -#https://projects.knownelement.com/issues/271 -https://github.com/thecatlady/docker-webhook - -#################### -# CTO Stuff -#################### - -#https://projects.knownelement.com/issues/173 -https://github.com/inventree/InvenTree.git - -#https://projects.knownelement.com/issues/180 -https://github.com/Cloud-RF/tak-server - -#https://projects.knownelement.com/issues/178 -https://github.com/midday-ai/midday.git - -#https://projects.knownelement.com/issues/181 -https://github.com/killbill/killbill.git - -#https://projects.knownelement.com/issues/184 -https://github.com/chirpstack/chirpstack.git - -#https://projects.knownelement.com/issues/185 -https://github.com/CraigChat/craig.git - -#https://projects.knownelement.com/issues/188 -https://github.com/elabftw/elabftw.git - -#https://projects.knownelement.com/issues/196 -https://github.com/jamovi/jamovi.git - -#https://projects.knownelement.com/issues/197 -https://github.com/INTI-CMNB/KiBot.git - -#https://projects.knownelement.com/issues/214 -https://github.com/Resgrid/Core - -#https://projects.knownelement.com/issues/216 -https://github.com/reviewboard/reviewboard.git - -#https://projects.knownelement.com/issues/218 -https://gitlab.com/librespacefoundation/satnogs/docker-kaitai.git -https://gitlab.com/librespacefoundation/satnogs/docker-satnogs-webgui.git - -#https://projects.knownelement.com/issues/219 -https://github.com/f4exb/sdrangel-docker - -#https://projects.knownelement.com/issues/221 -https://github.com/SigNoz/signoz.git - -#https://projects.knownelement.com/issues/228 -https://github.com/sebo-b/warp.git - -#https://projects.knownelement.com/issues/272 -https://github.com/jgraph/docker-drawio - -#https://projects.knownelement.com/issues/274 -https://github.com/openblocks-dev/openblocks.git - -#https://projects.knownelement.com/issues/276 -https://github.com/wireviz/wireviz-web.git - -#https://projects.knownelement.com/issues/278 -https://github.com/opulo-inc/autobom.git - -#https://projects.knownelement.com/issues/279 -https://github.com/PLMore/PLMore - -#https://projects.knownelement.com/issues/282 -https://github.com/manyfold3d/manyfold.git - -#https://projects.knownelement.com/issues/283 -https://github.com/langfuse/oss-llmops-stack.git - -#https://projects.knownelement.com/issues/286 -https://github.com/HeyPuter/puter.git - -#https://projects.knownelement.com/issues/285 -https://github.com/windmill-labs/windmill.git - -#https://projects.knownelement.com/issues/326 -https://github.com/sbabic/swupdate.git - -#https://projects.knownelement.com/issues/300 -https://github.com/mendersoftware/mender-server.git - -#https://projects.knownelement.com/issues/50 -https://github.com/vanila-io/wireflow.git - -#https://projects.knownelement.com/issues/226 -https://github.com/nautechsystems/nautilus_trader.git - -#TBD -https://github.com/funmusicplace/mirlo.git - -) - -WORKDIR="$(cd "$(dirname "$0")" && pwd)" -TARGET_DIR="${WORKDIR}/Docker" -mkdir -p "$TARGET_DIR" - -# If REPOS.txt exists, read additional repos (lines; ignore # and blanks) -EXTRA_REPOS_FILE="${WORKDIR}/REPOS.txt" -if [[ -f "$EXTRA_REPOS_FILE" ]]; then - mapfile -t EXTRA_REPOS < <(sed -e 's/#.*$//' -e '/^\s*$/d' "$EXTRA_REPOS_FILE") -else - EXTRA_REPOS=() -fi - -ALL_REPOS=("${GIT_REPO_LIST[@]}" "${EXTRA_REPOS[@]}") - -echo "Cloning to: $TARGET_DIR" -printf ' - %s\n' "${ALL_REPOS[@]}" - -cd "$TARGET_DIR" - -# Parallel clones (default 4 jobs). Avoid failing the whole script on single failures. -JOBS="${JOBS:-4}" -printf '%s\n' "${ALL_REPOS[@]}" | xargs -n1 -P "$JOBS" -I{} bash -lc 'repo="{}"; name=$(basename -s .git "$repo"); if [[ -d "$name/.git" ]]; then echo "exists: $name"; else git clone --depth 1 "$repo" "$name" || echo "failed: $repo"; fi' diff --git a/PackagingForCloudronWorkspace/UpstreamVendor-Update.sh b/PackagingForCloudronWorkspace/UpstreamVendor-Update.sh deleted file mode 100755 index 66649b5..0000000 --- a/PackagingForCloudronWorkspace/UpstreamVendor-Update.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash - -export PS4='(${BASH_SOURCE}:${LINENO}): - [${SHLVL},${BASH_SUBSHELL},$?] $ ' - -function error_out() -{ - echo "Bailing out. See above for reason...." - exit 1 -} - -function handle_failure() { - local lineno=$1 - local fn=$2 - local exitstatus=$3 - local msg=$4 - local lineno_fns=${0% 0} - if [[ "$lineno_fns" != "-1" ]] ; then - lineno="${lineno} ${lineno_fns}" - fi - echo "${BASH_SOURCE[0]}: Function: ${fn} Line Number : [${lineno}] Failed with status ${exitstatus}: $msg" -} - -trap 'handle_failure "${BASH_LINENO[*]}" "$LINENO" "${FUNCNAME[*]:-script}" "$?" "$BASH_COMMAND"' ERR - -set -o errexit -set -o nounset -set -o pipefail -set -o functrace - -WORKDIR="$(cd "$(dirname "$0")" && pwd)" -TARGET_DIR="${WORKDIR}/Docker" - -cd "$TARGET_DIR" - -# Iterate only over directories that are git repos -while IFS= read -r -d '' repo_dir; do - echo "Updating: ${repo_dir}" - pushd "$repo_dir" >/dev/null - if [[ -d .git ]]; then - git -c advice.detachedHead=false fetch --all --prune || true - # Fast-forward only to avoid unintended merges - git -c advice.detachedHead=false pull --ff-only || true - else - echo "Skipping (not a git repo): ${repo_dir}" - fi - popd >/dev/null -done < <(find . -mindepth 1 -maxdepth 1 -type d -print0) diff --git a/TODO.md b/TODO.md deleted file mode 100644 index 2cc2870..0000000 --- a/TODO.md +++ /dev/null @@ -1,11 +0,0 @@ -# TODO - -## Active -- [x] Confirm packaging container/image rename (`scripts/packaging-up.sh`, `scripts/packaging-enter.sh`, `scripts/packaging-exec.sh`) by rebuilding under the `KNELCloudron-packaging` name and validating workflow scripts. (2025-10-17) -- [ ] Push updated base packaging image `git.knownelement.com/knel/knelcloudron-packaging:latest` to the registry once tested inside the container. -- [ ] Publish the curated shortlist of target FLOSS apps absent from the Cloudron store and agree on a packaging order. -- [ ] Add explicit documentation about the `KNELCloudron-` Docker artifact prefix in `README.md` and packaging templates. - -## Backlog -- [ ] Explore automation to scaffold `CloudronManifest.json` files from upstream metadata within the packaging container. -- [ ] Prototype a containerized smoke-test harness for validating packaged apps via `scripts/packaging-exec.sh`. diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index 58f3bb0..0000000 --- a/docker-compose.yml +++ /dev/null @@ -1,16 +0,0 @@ -version: '3.8' - -services: - jenkins: - build: - context: ./CloudronPackages/Jenkins - dockerfile: Dockerfile - ports: - - "8080:8080" - environment: - - JENKINS_HOME=/tmp/jenkins_home - - JENKINS_OPTS=--httpPort=8080 --httpListenAddress=0.0.0.0 - - APP_PORT=8080 - tmpfs: - - /tmp/jenkins_home - restart: "no" diff --git a/docker/packaging/Dockerfile b/docker/packaging/Dockerfile deleted file mode 100644 index 3ab0009..0000000 --- a/docker/packaging/Dockerfile +++ /dev/null @@ -1,17 +0,0 @@ -FROM docker:26-cli - -# Install tools needed for Cloudron packaging inside the container -RUN apk add --no-cache \ - bash git curl jq \ - build-base \ - nodejs npm \ - openssh-client - -# Cloudron CLI (used for packaging commands) -RUN npm i -g cloudron - -WORKDIR /workspace - -# Default command keeps the container running -CMD ["sh", "-lc", "tail -f /dev/null"] - diff --git a/mise.toml b/mise.toml deleted file mode 100644 index 50b5bbd..0000000 --- a/mise.toml +++ /dev/null @@ -1,2 +0,0 @@ -[tools] -node = "20.19.3" diff --git a/scripts/new-package.sh b/scripts/new-package.sh deleted file mode 100755 index 14e151d..0000000 --- a/scripts/new-package.sh +++ /dev/null @@ -1,55 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -usage() { - cat <<'EOF' -Usage: scripts/new-package.sh [--id ] [--title ] [--port <port>] - -Creates CloudronPackages/<AppName> from PackageTemplate and replaces placeholders: - __APP_ID__, __APP_TITLE__, __HTTP_PORT__ - -Examples: - scripts/new-package.sh MyApp --id com.example.myapp --title "My App" --port 3000 -EOF -} - -if [[ $# -lt 1 ]]; then - usage; exit 1 -fi - -APP_NAME="$1"; shift -APP_ID="com.example.${APP_NAME,,}" -APP_TITLE="$APP_NAME" -HTTP_PORT="3000" -BASE_TAG="5.0.0" - -while [[ $# -gt 0 ]]; do - case "$1" in - --id) APP_ID="$2"; shift 2;; - --title) APP_TITLE="$2"; shift 2;; - --port) HTTP_PORT="$2"; shift 2;; - --base) BASE_TAG="$2"; shift 2;; - -h|--help) usage; exit 0;; - *) echo "Unknown argument: $1"; usage; exit 1;; - esac -done - -SRC_DIR="CloudronPackages/PackageTemplate" -DEST_DIR="CloudronPackages/${APP_NAME}" - -[[ -d "$SRC_DIR" ]] || { echo "Template not found: $SRC_DIR"; exit 1; } -[[ -e "$DEST_DIR" ]] && { echo "Destination already exists: $DEST_DIR"; exit 1; } - -mkdir -p "$DEST_DIR" -cp -a "$SRC_DIR"/. "$DEST_DIR"/ - -# Replace placeholders in text files -find "$DEST_DIR" -type f \( -name "*" ! -name "*.png" \) -print0 | while IFS= read -r -d '' f; do - sed -i "s#__APP_ID__#${APP_ID}#g" "$f" - sed -i "s#__APP_TITLE__#${APP_TITLE}#g" "$f" - sed -i "s#__HTTP_PORT__#${HTTP_PORT}#g" "$f" - sed -i "s#__CLOUDRON_BASE__#${BASE_TAG}#g" "$f" -done - -echo "Created package at: $DEST_DIR" -echo "Next steps: edit Dockerfile and start.sh to run your app. Add logo.png if desired." diff --git a/scripts/packaging-enter.sh b/scripts/packaging-enter.sh deleted file mode 100755 index 570e237..0000000 --- a/scripts/packaging-enter.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail -NAME=${PACKAGING_CONTAINER_NAME:-KNELCloudron-packaging} - -if ! docker ps --format '{{.Names}}' | grep -qx "$NAME"; then - scripts/packaging-up.sh >/dev/null -fi - -exec docker exec -it "$NAME" bash diff --git a/scripts/packaging-exec.sh b/scripts/packaging-exec.sh deleted file mode 100755 index 5c55cd1..0000000 --- a/scripts/packaging-exec.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail -NAME=${PACKAGING_CONTAINER_NAME:-KNELCloudron-packaging} - -if [[ $# -lt 1 ]]; then - echo "Usage: scripts/packaging-exec.sh <command...>" >&2 - exit 1 -fi - -if ! docker ps --format '{{.Names}}' | grep -qx "$NAME"; then - scripts/packaging-up.sh >/dev/null -fi - -exec docker exec -it "$NAME" sh -lc "$*" diff --git a/scripts/packaging-up.sh b/scripts/packaging-up.sh deleted file mode 100755 index 64e1ad2..0000000 --- a/scripts/packaging-up.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -NAME=${PACKAGING_CONTAINER_NAME:-KNELCloudron-packaging} -IMAGE=${PACKAGING_IMAGE:-git.knownelement.com/knel/knelcloudron-packaging:latest} -DOCKERFILE=${PACKAGING_DOCKERFILE:-docker/packaging/Dockerfile} - -if ! docker image inspect "$IMAGE" >/dev/null 2>&1; then - echo "Building packaging image: $IMAGE" - docker build -t "$IMAGE" -f "$DOCKERFILE" . -fi - -if ! docker ps -a --format '{{.Names}}' | grep -qx "$NAME"; then - echo "Creating container: $NAME" - docker run -d \ - --name "$NAME" \ - -v "$PWD":/workspace \ - -w /workspace \ - -v /var/run/docker.sock:/var/run/docker.sock \ - "$IMAGE" -else - # Ensure it is running - if ! docker ps --format '{{.Names}}' | grep -qx "$NAME"; then - echo "Starting container: $NAME" - docker start "$NAME" - fi -fi - -echo "Packaging container ready: $NAME (image: $IMAGE)" diff --git a/scripts/todo-generate.sh b/scripts/todo-generate.sh deleted file mode 100755 index 1f5dd16..0000000 --- a/scripts/todo-generate.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -CLONE_SCRIPT="PackagingForCloudronWorkspace/UpstreamVendor-Clone.sh" -EXTRA_REPOS_FILE="PackagingForCloudronWorkspace/REPOS.txt" - -if [[ ! -f "$CLONE_SCRIPT" ]]; then - echo "Missing $CLONE_SCRIPT" >&2 - exit 1 -fi - -repo_lines=$(awk '/^https?:\/\//{print $0}' "$CLONE_SCRIPT" | sed 's/#.*$//' | sed -n '/^https:\/\//p') -if [[ -f "$EXTRA_REPOS_FILE" ]]; then - extra=$(sed -e 's/#.*$//' -e '/^\s*$/d' "$EXTRA_REPOS_FILE" | sed -n '/^https:\/\//p') -else - extra="" -fi - -all_urls=$(printf "%s\n%s\n" "$repo_lines" "$extra" | sed 's/.git$//' | sort -u) - -readarray -t urls <<< "$all_urls" - -now=$(date -Is) - -cat <<EOF -# TODO: Cloudron Packaging Backlog - -Generated: $now - -Legend: -- [ ] todo -- [x] scaffolded in repo (not necessarily validated) - -Instructions: -- Regenerate this file: `scripts/todo-update.sh` -- All package work happens in containers (see README and AGENTS.md) - -## Backlog -EOF - -for url in "${urls[@]}"; do - org_repo=${url#*://*/} - org=$(echo "$org_repo" | awk -F/ '{print $1}') - name=$(echo "$org_repo" | awk -F/ '{print $2}') - # Guess CloudronPackages directory from repo name (TitleCase, strip -/_) - guess_dir=$(echo "$name" | sed -E 's/[-_]+/ /g' | awk '{for(i=1;i<=NF;i++){ $i=toupper(substr($i,1,1)) substr($i,2)}; gsub(/ /,""); print}') - status="[ ]" - if [[ -f "CloudronPackages/${guess_dir}/CloudronManifest.json" ]]; then - status="[x]" - fi - printf "- %s %s — %s/%s\n" "$status" "$name" "$org" "$name" -done - diff --git a/scripts/todo-update.sh b/scripts/todo-update.sh deleted file mode 100755 index a511b61..0000000 --- a/scripts/todo-update.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -scripts/todo-generate.sh > TODO.md -echo "Updated TODO.md" - diff --git a/scripts/workspace-clone.sh b/scripts/workspace-clone.sh deleted file mode 100755 index 47b1ed5..0000000 --- a/scripts/workspace-clone.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -# Run the clone script inside the packaging container -scripts/packaging-exec.sh "cd PackagingForCloudronWorkspace && chmod +x *.sh && ./UpstreamVendor-Clone.sh" - diff --git a/scripts/workspace-update.sh b/scripts/workspace-update.sh deleted file mode 100755 index 9b5e28d..0000000 --- a/scripts/workspace-update.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -# Run the update script inside the packaging container -scripts/packaging-exec.sh "cd PackagingForCloudronWorkspace && chmod +x *.sh && ./UpstreamVendor-Update.sh" -