Restructure repository into output workspace

This commit is contained in:
2025-10-02 14:04:13 -05:00
parent fe0ade1dd9
commit 6e3f60cd9d
420 changed files with 256 additions and 220 deletions

View File

@@ -3,32 +3,33 @@
## Non-negotiable rules ## Non-negotiable rules
- Host commands are limited to `git`, `docker`, and `curl`. Everything else runs inside the provided wrapper scripts. - Host commands are limited to `git`, `docker`, and `curl`. Everything else runs inside the provided wrapper scripts.
- Use `./run/dev.sh` for all development automation (scaffolding, linting, status updates). - Use `./output/run/dev.sh` for all development automation (scaffolding, linting, status updates).
- Use `./run/packager.sh` for packaging tasks that require the Cloudron CLI. - Use `./output/run/packager.sh` for packaging tasks that require the Cloudron CLI.
- Containers mount the repo at `/workspace`; do not write outside it. - Containers mount the repo at `/workspace`; do not write outside it.
- Keep collaboration artifacts under `collab/` and agent-owned generated outputs under `output/`; treat these as the only top-level workspaces for coordination versus deliverables.
## Images ## Images
- `knel/cloudron-devtools` built automatically by `./run/dev.sh`; contains Python tooling. - `knel/cloudron-devtools` built automatically by `./output/run/dev.sh`; contains Python tooling.
- `knel/cloudron-packager` built automatically by `./run/packager.sh`; contains the Cloudron CLI. - `knel/cloudron-packager` built automatically by `./output/run/packager.sh`; contains the Cloudron CLI.
## Common workflows ## Common workflows
```bash ```bash
# Generate/refresh a scaffold # Generate/refresh a scaffold
./run/dev.sh python scripts/new_app.py --slug apache-apisix ./output/run/dev.sh python output/scripts/new_app.py --slug apache-apisix
# Regenerate the full catalog (overwrites existing scaffolds) # Regenerate the full catalog (overwrites existing scaffolds)
./run/dev.sh python scripts/new_app.py --force ./output/run/dev.sh python output/scripts/new_app.py --force
# Lint an app (fails on TODO placeholders) # Lint an app (fails on TODO placeholders)
./run/dev.sh python scripts/lint_repo.py --slug apache-apisix --strict ./output/run/dev.sh python output/scripts/lint_repo.py --slug apache-apisix --strict
# Refresh docs/APP_STATUS.md without changing the timestamp # Refresh output/docs/APP_STATUS.md without changing the timestamp
./run/dev.sh python scripts/generate_status.py --preserve-timestamp ./output/run/dev.sh python output/scripts/generate_status.py --preserve-timestamp
# Open the Cloudron packaging shell (add BUILD=1 to rebuild the image first) # Open the Cloudron packaging shell (add BUILD=1 to rebuild the image first)
./run/packager.sh ./output/run/packager.sh
``` ```
## Notes ## Notes

View File

@@ -2,52 +2,53 @@
This repository scaffolds Cloudron packages for Known Element's portfolio. It provides: This repository scaffolds Cloudron packages for Known Element's portfolio. It provides:
- A reusable application template (`templates/cloudron-app`) matching Cloudron packaging conventions. - A reusable application template (`output/templates/cloudron-app`) matching Cloudron packaging conventions.
- Automation helpers in `scripts/` to instantiate per-app scaffolds and run builds inside a dedicated Docker container. - Automation helpers in `output/scripts/` to instantiate per-app scaffolds and run builds inside a dedicated Docker container.
- A curated catalog (`apps/catalog.json`) that maps Known Element issue IDs to upstream projects. - A curated catalog (`output/apps/catalog.json`) that maps Known Element issue IDs to upstream projects.
- Documentation under `docs/` to guide packaging, testing, and release workflows. - Documentation under `output/docs/` to guide packaging, testing, and release workflows.
## Quick start ## Quick start
```bash ```bash
# Build or refresh the devtools image (first run builds automatically) # Build or refresh the devtools image (first run builds automatically)
./run/dev.sh python --version ./output/run/dev.sh python --version
# Generate or refresh a single app scaffold # Generate or refresh a single app scaffold
./run/dev.sh python scripts/new_app.py --slug apache-apisix ./output/run/dev.sh python output/scripts/new_app.py --slug apache-apisix
# Regenerate every scaffold (overwrites existing directories) # Regenerate every scaffold (overwrites existing directories)
./run/dev.sh python scripts/new_app.py --force ./output/run/dev.sh python output/scripts/new_app.py --force
# Lint an app and fail on placeholders # Lint an app and fail on placeholders
./run/dev.sh python scripts/lint_repo.py --slug apache-apisix --strict ./output/run/dev.sh python output/scripts/lint_repo.py --slug apache-apisix --strict
# Update the status dashboard # Update the status dashboard
./run/dev.sh python scripts/generate_status.py --preserve-timestamp ./output/run/dev.sh python output/scripts/generate_status.py --preserve-timestamp
``` ```
### Packaging shell ### Packaging shell
```bash ```bash
# Build the Cloudron packager image (run when Dockerfile changes) # Build the Cloudron packager image (run when Dockerfile changes)
BUILD=1 ./run/packager.sh BUILD=1 ./output/run/packager.sh
# Launch an interactive Cloudron packaging shell # Launch an interactive Cloudron packaging shell
./run/packager.sh ./output/run/packager.sh
``` ```
All other development tasks should also use `./run/dev.sh` (pass the desired command after the script). The wrapper will build the devtools image if needed and ensure every command executes inside Docker. All other development tasks should also use `./output/run/dev.sh` (pass the desired command after the script). The wrapper will build the devtools image if needed and ensure every command executes inside Docker.
## Repository layout ## Repository layout
- `apps/` generated app scaffolds and metadata - `collab/` shared workspace for operator/agent collaboration (questions, proposals, plans).
- `docs/` playbooks and architecture notes - `output/apps/` generated Cloudron app scaffolds and metadata.
- `docs/CI_CD_GITEA.md` instructions for running CI/CD and publishing images via the Gitea instance - `output/docs/` playbooks, architecture notes, and status dashboards.
- `docker/devtools/` Docker image that runs scaffolding, linting, and status tooling - `output/docker/devtools/` Docker image that runs scaffolding, linting, and status tooling.
- `docker/packager/` Docker image for Cloudron packaging workflows - `output/docker/packager/` Docker image for Cloudron packaging workflows.
- `scripts/` helper scripts (scaffolding, tooling entrypoints) - `output/run/` wrapper scripts for devtools and packager containers.
- `templates/` base Cloudron app template - `output/scripts/` helper scripts (scaffolding, tooling entrypoints).
- `output/templates/` base Cloudron app template.
## Application catalog ## Application catalog
@@ -118,24 +119,24 @@ Run quality checks via the devtools wrapper:
```bash ```bash
# Fail if placeholders remain in the target manifest/start script # Fail if placeholders remain in the target manifest/start script
./run/dev.sh python scripts/lint_repo.py --slug apache-apisix --strict ./output/run/dev.sh python output/scripts/lint_repo.py --slug apache-apisix --strict
# Refresh docs/APP_STATUS.md without changing the existing timestamp # Refresh output/docs/APP_STATUS.md without changing the existing timestamp
./run/dev.sh python scripts/generate_status.py --preserve-timestamp ./output/run/dev.sh python output/scripts/generate_status.py --preserve-timestamp
``` ```
Use `./run/packager.sh` whenever you need the Cloudron CLI to build, install, or push packages—it drops you into the dedicated packaging container. Use `./output/run/packager.sh` whenever you need the Cloudron CLI to build, install, or push packages—it drops you into the dedicated packaging container.
## CI/CD ## CI/CD
The workflow `.gitea/workflows/ci.yml` mirrors the same commands by invoking the devtools container inside the runner. To reproduce the pipeline locally, run: The workflow `.gitea/workflows/ci.yml` mirrors the same commands by invoking the devtools container inside the runner. To reproduce the pipeline locally, run:
```bash ```bash
./run/dev.sh python scripts/lint_repo.py --strict --slug apache-apisix ./output/run/dev.sh python output/scripts/lint_repo.py --strict --slug apache-apisix
./run/dev.sh python scripts/generate_status.py --preserve-timestamp ./output/run/dev.sh python output/scripts/generate_status.py --preserve-timestamp
BUILD=1 ./run/packager.sh # optional: rebuild packager image before smoke tests BUILD=1 ./output/run/packager.sh # optional: rebuild packager image before smoke tests
``` ```
Once a Gitea Actions runner is available, enable the workflow and it will build `knel/cloudron-devtools`/`knel/cloudron-ci` automatically. Once a Gitea Actions runner is available, enable the workflow and it will build `knel/cloudron-devtools`/`knel/cloudron-ci` automatically.
Refer to `docs/PACKAGING_GUIDE.md` and `AGENTS.md` for detailed operating procedures. Refer to `output/docs/PACKAGING_GUIDE.md` and `AGENTS.md` for detailed operating procedures.

View File

@@ -0,0 +1,7 @@
# APISIX Packaging Clarifying Questions
1. Which upstream release/tag of Apache APISIX should we target for this first Cloudron package?
2. Are there existing Cloudron add-ons (e.g., PostgreSQL, Redis, MySQL, etc.) that you want us to prefer or avoid for APISIX, given its components (dashboard, etcd, control plane)?
3. Do you expect the initial package to ship with the APISIX Dashboard enabled, or should we scope it to the core gateway only?
4. Are there organization-specific runtime constraints (CPU/memory limits, required domains/subpaths, TLS expectations) that we need to bake into the manifest from the start?
5. Should we integrate any Known Element branding or default configuration (e.g., custom log formats, auth plugins) as part of the base package, or keep it stock upstream behavior?

View File

@@ -1,20 +0,0 @@
# Local Test Harness
All verification runs through the wrapper scripts under `run/`, ensuring every command executes in Docker.
## Devtools checks
Use `./run/dev.sh` for linting and documentation updates:
```bash
./run/dev.sh python scripts/lint_repo.py --slug apache-apisix --strict
./run/dev.sh python scripts/generate_status.py --preserve-timestamp
```
## Packaging shell
Invoke `./run/packager.sh` (optionally with `BUILD=1`) when you need the Cloudron CLI to build, install, or push packages.
## CI parity
The Gitea workflow calls the same commands via the devtools image. To mimic it locally, run the lint/status commands above followed by any smoke tests inside the packager shell.

View File

@@ -11,10 +11,10 @@ jobs:
uses: https://gitea.com/actions/checkout@v4 uses: https://gitea.com/actions/checkout@v4
- name: Build devtools image if needed - name: Build devtools image if needed
run: ./run/dev.sh python --version run: ./output/run/dev.sh python --version
- name: Lint repository (strict mode) - name: Lint repository (strict mode)
run: ./run/dev.sh python scripts/lint_repo.py --strict run: ./output/run/dev.sh python output/scripts/lint_repo.py --strict
- name: Regenerate status dashboard - name: Regenerate status dashboard
run: ./run/dev.sh python scripts/generate_status.py --preserve-timestamp run: ./output/run/dev.sh python output/scripts/generate_status.py --preserve-timestamp

View File

View File

@@ -16,5 +16,5 @@
## Notes ## Notes
- Populate the `app/` directory with runtime overlays or artifacts generated during the build stage. - Populate the `app/` directory with runtime overlays or artifacts generated during the build stage.
- Use the shared packaging container (`docker/packager`) for `cloudron build/install` to keep the host clean. - Use the shared packaging container (`output/docker/packager`) for `cloudron build/install` to keep the host clean.
- Record decisions and operational requirements under `docs/apps/apache-apisix/` as work progresses. - Record decisions and operational requirements under `output/docs/apps/apache-apisix/` as work progresses.

View File

@@ -16,5 +16,5 @@
## Notes ## Notes
- Populate the `app/` directory with runtime overlays or artifacts generated during the build stage. - Populate the `app/` directory with runtime overlays or artifacts generated during the build stage.
- Use the shared packaging container (`docker/packager`) for `cloudron build/install` to keep the host clean. - Use the shared packaging container (`output/docker/packager`) for `cloudron build/install` to keep the host clean.
- Record decisions and operational requirements under `docs/apps/autobom/` as work progresses. - Record decisions and operational requirements under `output/docs/apps/autobom/` as work progresses.

View File

@@ -16,5 +16,5 @@
## Notes ## Notes
- Populate the `app/` directory with runtime overlays or artifacts generated during the build stage. - Populate the `app/` directory with runtime overlays or artifacts generated during the build stage.
- Use the shared packaging container (`docker/packager`) for `cloudron build/install` to keep the host clean. - Use the shared packaging container (`output/docker/packager`) for `cloudron build/install` to keep the host clean.
- Record decisions and operational requirements under `docs/apps/chirpstack/` as work progresses. - Record decisions and operational requirements under `output/docs/apps/chirpstack/` as work progresses.

View File

@@ -16,5 +16,5 @@
## Notes ## Notes
- Populate the `app/` directory with runtime overlays or artifacts generated during the build stage. - Populate the `app/` directory with runtime overlays or artifacts generated during the build stage.
- Use the shared packaging container (`docker/packager`) for `cloudron build/install` to keep the host clean. - Use the shared packaging container (`output/docker/packager`) for `cloudron build/install` to keep the host clean.
- Record decisions and operational requirements under `docs/apps/consuldemocracy/` as work progresses. - Record decisions and operational requirements under `output/docs/apps/consuldemocracy/` as work progresses.

View File

@@ -16,5 +16,5 @@
## Notes ## Notes
- Populate the `app/` directory with runtime overlays or artifacts generated during the build stage. - Populate the `app/` directory with runtime overlays or artifacts generated during the build stage.
- Use the shared packaging container (`docker/packager`) for `cloudron build/install` to keep the host clean. - Use the shared packaging container (`output/docker/packager`) for `cloudron build/install` to keep the host clean.
- Record decisions and operational requirements under `docs/apps/craig/` as work progresses. - Record decisions and operational requirements under `output/docs/apps/craig/` as work progresses.

View File

@@ -16,5 +16,5 @@
## Notes ## Notes
- Populate the `app/` directory with runtime overlays or artifacts generated during the build stage. - Populate the `app/` directory with runtime overlays or artifacts generated during the build stage.
- Use the shared packaging container (`docker/packager`) for `cloudron build/install` to keep the host clean. - Use the shared packaging container (`output/docker/packager`) for `cloudron build/install` to keep the host clean.
- Record decisions and operational requirements under `docs/apps/database-gateway/` as work progresses. - Record decisions and operational requirements under `output/docs/apps/database-gateway/` as work progresses.

View File

@@ -16,5 +16,5 @@
## Notes ## Notes
- Populate the `app/` directory with runtime overlays or artifacts generated during the build stage. - Populate the `app/` directory with runtime overlays or artifacts generated during the build stage.
- Use the shared packaging container (`docker/packager`) for `cloudron build/install` to keep the host clean. - Use the shared packaging container (`output/docker/packager`) for `cloudron build/install` to keep the host clean.
- Record decisions and operational requirements under `docs/apps/datahub/` as work progresses. - Record decisions and operational requirements under `output/docs/apps/datahub/` as work progresses.

View File

@@ -16,5 +16,5 @@
## Notes ## Notes
- Populate the `app/` directory with runtime overlays or artifacts generated during the build stage. - Populate the `app/` directory with runtime overlays or artifacts generated during the build stage.
- Use the shared packaging container (`docker/packager`) for `cloudron build/install` to keep the host clean. - Use the shared packaging container (`output/docker/packager`) for `cloudron build/install` to keep the host clean.
- Record decisions and operational requirements under `docs/apps/docassemble/` as work progresses. - Record decisions and operational requirements under `output/docs/apps/docassemble/` as work progresses.

View File

@@ -16,5 +16,5 @@
## Notes ## Notes
- Populate the `app/` directory with runtime overlays or artifacts generated during the build stage. - Populate the `app/` directory with runtime overlays or artifacts generated during the build stage.
- Use the shared packaging container (`docker/packager`) for `cloudron build/install` to keep the host clean. - Use the shared packaging container (`output/docker/packager`) for `cloudron build/install` to keep the host clean.
- Record decisions and operational requirements under `docs/apps/docker-webhook/` as work progresses. - Record decisions and operational requirements under `output/docs/apps/docker-webhook/` as work progresses.

View File

@@ -16,5 +16,5 @@
## Notes ## Notes
- Populate the `app/` directory with runtime overlays or artifacts generated during the build stage. - Populate the `app/` directory with runtime overlays or artifacts generated during the build stage.
- Use the shared packaging container (`docker/packager`) for `cloudron build/install` to keep the host clean. - Use the shared packaging container (`output/docker/packager`) for `cloudron build/install` to keep the host clean.
- Record decisions and operational requirements under `docs/apps/drawio/` as work progresses. - Record decisions and operational requirements under `output/docs/apps/drawio/` as work progresses.

View File

@@ -16,5 +16,5 @@
## Notes ## Notes
- Populate the `app/` directory with runtime overlays or artifacts generated during the build stage. - Populate the `app/` directory with runtime overlays or artifacts generated during the build stage.
- Use the shared packaging container (`docker/packager`) for `cloudron build/install` to keep the host clean. - Use the shared packaging container (`output/docker/packager`) for `cloudron build/install` to keep the host clean.
- Record decisions and operational requirements under `docs/apps/easy-gate/` as work progresses. - Record decisions and operational requirements under `output/docs/apps/easy-gate/` as work progresses.

View File

@@ -16,5 +16,5 @@
## Notes ## Notes
- Populate the `app/` directory with runtime overlays or artifacts generated during the build stage. - Populate the `app/` directory with runtime overlays or artifacts generated during the build stage.
- Use the shared packaging container (`docker/packager`) for `cloudron build/install` to keep the host clean. - Use the shared packaging container (`output/docker/packager`) for `cloudron build/install` to keep the host clean.
- Record decisions and operational requirements under `docs/apps/elabftw/` as work progresses. - Record decisions and operational requirements under `output/docs/apps/elabftw/` as work progresses.

View File

@@ -16,5 +16,5 @@
## Notes ## Notes
- Populate the `app/` directory with runtime overlays or artifacts generated during the build stage. - Populate the `app/` directory with runtime overlays or artifacts generated during the build stage.
- Use the shared packaging container (`docker/packager`) for `cloudron build/install` to keep the host clean. - Use the shared packaging container (`output/docker/packager`) for `cloudron build/install` to keep the host clean.
- Record decisions and operational requirements under `docs/apps/fleetdm-fleet/` as work progresses. - Record decisions and operational requirements under `output/docs/apps/fleetdm-fleet/` as work progresses.

Some files were not shown because too many files have changed in this diff Show More