diff --git a/containers/126-plato.md b/containers/126-plato.md index 98ff72d..d2a38cc 100644 --- a/containers/126-plato.md +++ b/containers/126-plato.md @@ -24,7 +24,17 @@ Single-container deploy. The repo's `Dockerfile` is a three-stage build (Node restart: unless-stopped ``` - **`.env`** at `/opt/plato/app/.env` (optional, untracked) — LLM provider keys (`OPENROUTER_API_KEY`, `ANTHROPIC_API_KEY`, etc.) and `PLANTUML_BASE_URL` override. Absent by default; LLM features stay greyed out, PlantUML defaults to the public service. -- **Run / update:** `cd /opt/plato/app && git pull && docker compose up -d --build`. +- **Run / update:** push to `dtoro/Plato` (auto-deploys, see below) or `cd /opt/plato/app && git pull && docker compose up -d --build` for a manual rebuild. + +## Auto-deploy + +Push to `dtoro/Plato` `main` triggers a rebuild — same Shape B pattern as [Artifacto / mule-image](../infrastructure/auto-deploy.md). Webhook receiver at `/opt/plato-deploy/`, systemd unit `plato-deploy-webhook.service`, port `9799`, gitea hook id 8. + +- Receiver: `http://192.168.8.190:9799/deploy`, signed payload (HMAC-SHA256, secret in `/etc/plato-deploy/secret`). +- Logs: `journalctl -u plato-deploy-webhook -f`. +- Health: `curl http://127.0.0.1:9799/health`. +- Manual deploy: `/opt/plato-deploy/deploy.sh`. +- Gitea's `app.ini` `ALLOWED_HOST_LIST` was extended with `192.168.8.190` to allow this delivery. ## Fresh-DB bootstrap workaround @@ -91,5 +101,8 @@ address=/plato.hubris.network/192.168.8.175 ## Changelog +### 2026-05-13 — auto-deploy wired +Shape B pipeline added (`/opt/plato-deploy/`, port `9799`, gitea hook id 8). `ALLOWED_HOST_LIST` in gitea `app.ini` extended with `192.168.8.190`. See [auto-deploy](../infrastructure/auto-deploy.md#plato). + ### 2026-05-13 — container created, Plato deployed LXC 126 stood up on Debian 12 standard, privileged, docker-ce installed. Plato cloned from `dtoro/Plato`, built and started. Caddy site and dnsmasq split-horizon entry added. Recycled the IP/ID slot freed earlier the same day by the [decommissioned Seafile experiment (LXC 125)](index.md#recently-destroyed-kept-for-archaeology). Hit the [fresh-DB bootstrap bug](#fresh-db-bootstrap-workaround) on first boot; worked around by pre-seeding the SQLite schema. diff --git a/infrastructure/auto-deploy.md b/infrastructure/auto-deploy.md index a6091c9..08f53e7 100644 --- a/infrastructure/auto-deploy.md +++ b/infrastructure/auto-deploy.md @@ -23,6 +23,7 @@ The app repo at `/opt/` is the working tree, but the deploy tooling (`web - `192.168.8.230` ([claudio-bot (123)](../containers/123-claudio-bot.md)) - `192.168.8.136` ([mule-images (120)](../containers/120-mule-images.md)) - `192.168.8.77` ([hubris host](../hosts/hubris.md) — backup-library) + - `192.168.8.190` ([plato (126)](../containers/126-plato.md)) **Don't strip these when editing app.ini.** @@ -36,6 +37,7 @@ The app repo at `/opt/` is the working tree, but the deploy tooling (`web | `dtoro/gitea-customizations` | [gitea (104)](../containers/104-gitea.md) `/var/lib/gitea/custom/` | A | `http://127.0.0.1:9797/deploy` (loopback) | (orig) | `systemctl restart gitea` if templates changed | | `dtoro/mule-image` | [mule-images (120)](../containers/120-mule-images.md) `/opt/mule-image/` | B | `http://192.168.8.136:9797/deploy` | 6 | `docker compose up -d --build` | | `dtoro/Artifacto` | [apps (105)](../containers/105-apps.md) `/opt/artifacto/` | B | `http://192.168.8.205:9798/deploy` | 7 | `docker compose up -d --build` | +| `dtoro/Plato` | [plato (126)](../containers/126-plato.md) `/opt/plato/app/` | B | `http://192.168.8.190:9799/deploy` | 8 | `docker compose up -d --build` | | `dtoro/claudio-bot` | [claudio-bot (123)](../containers/123-claudio-bot.md) `/opt/claudio-bot/` | A | `http://192.168.8.230:9797/deploy` | (orig) | `pip install` + `systemctl restart claudio-bot` | | `dtoro/backup-library` | [hubris host](../hosts/hubris.md) `/opt/backup-library/` | A | `http://192.168.8.77:9798/deploy` | (orig) | runs `deploy.sh` (preserves admin-edited `/etc/restic/include-*.list`) | @@ -49,6 +51,7 @@ Always commit + push. Local-only edits drift. Common ones: - `/var/lib/gitea/custom/` ↔ `dtoro/gitea-customizations` (auto-deploys) - `/opt/artifacto/` ↔ `dtoro/Artifacto` (auto-deploys) - `/opt/mule-image/` ↔ `dtoro/mule-image` (auto-deploys) +- `/opt/plato/app/` ↔ `dtoro/Plato` (auto-deploys) - `/opt/claudio-bot/` ↔ `dtoro/claudio-bot` (auto-deploys) - `/opt/backup-library/` ↔ `dtoro/backup-library` (auto-deploys) @@ -62,6 +65,11 @@ Always commit + push. Local-only edits drift. Common ones: - Receiver is on **loopback** (`127.0.0.1:9797`), not the LXC IP. - Online3DViewer binary assets are NOT tracked; `deploy.sh` fetches them on first run. +### Plato +- Shape B (`/opt/plato-deploy/{webhook.py,deploy.sh}`, port `9799`). +- The in-LXC checkout's `origin` is `http://192.168.8.121:3000/dtoro/Plato.git` (internal gitea), and git creds are at `/root/.git-credentials` rather than the `/etc/plato-deploy/git-credentials` pattern — the unit doesn't set `ProtectHome` so root's home is reachable. +- `/data` is a host bind (`/mnt/library/documents/plato`), so `docker compose up -d --build` rebuilds the image + restarts the container without touching the SQLite db. The [fresh-DB bootstrap workaround](../containers/126-plato.md#fresh-db-bootstrap-workaround) only matters if you blow `plato.db` away. + ### mule-image / Artifacto - Async deploy (returns 202) — gitea would otherwise time out the request. Logs: `pct exec -- journalctl -u -deploy-webhook -f`. - **Cloning from inside the LXC must use the internal gitea IP** (`http://192.168.8.121:3000/...`). `https://git.hubris.network` hits a connection reset from inside [apps (105)](../containers/105-apps.md) (Caddy routing / TLS hairpin not configured for this LXC). Configured `origin` on the in-LXC checkout is the internal URL. @@ -80,6 +88,9 @@ Always commit + push. Local-only edits drift. Common ones: ## Changelog +### 2026-05-13 — Plato pipeline added +Webhook id 8 on `dtoro/Plato` (port `9799` on [plato (126)](../containers/126-plato.md)). `app.ini` `ALLOWED_HOST_LIST` extended to include `192.168.8.190`. + ### 2026-04-28 — wiki entry created Initial documentation. Six active pipelines.