Refine AgentFeed UI and local workflow
This commit is contained in:
parent
3179f832fc
commit
ba9f5eb168
29 changed files with 2986 additions and 69 deletions
28
_archive_/hosts/README.md
Normal file
28
_archive_/hosts/README.md
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
# Daybook Hosts
|
||||
|
||||
This directory tracks Daybook deployment targets for fast iteration.
|
||||
|
||||
These notes are intentionally app-specific. They should answer: where is Daybook running, how do we update it, how do we verify it, and where does persistent Daybook data live?
|
||||
|
||||
They are not a replacement for host administration docs. For the Proxmox NUC, the canonical infrastructure source remains the NUC ops repo:
|
||||
|
||||
```text
|
||||
C:\Users\ritte\_PR_DEV_\LIVE_ADMIN\NUC_SERVER
|
||||
```
|
||||
|
||||
## Deployment Targets
|
||||
|
||||
| Host | Status | Notes |
|
||||
|---|---|---|
|
||||
| [NUC Daybook](nuc-daybook.md) | Live | Current local/LAN deployment in Proxmox LXC `128` |
|
||||
| [Cloud template](cloud-template.md) | Planned | Fill this in when a hosted/cloud instance is created |
|
||||
|
||||
## Documentation Rule
|
||||
|
||||
When a Daybook deployment changes, update the matching file here and the broader handoff doc if takeover facts changed:
|
||||
|
||||
```text
|
||||
planning/daybook-container-handoff.md
|
||||
```
|
||||
|
||||
When the NUC host/container configuration changes, also update the NUC ops knowledge base.
|
||||
85
_archive_/hosts/cloud-template.md
Normal file
85
_archive_/hosts/cloud-template.md
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
# Cloud Daybook Host Template
|
||||
|
||||
Use this when creating a hosted/cloud Daybook deployment.
|
||||
|
||||
Status: planned.
|
||||
|
||||
## Summary
|
||||
|
||||
| Item | Value |
|
||||
|---|---|
|
||||
| Provider | TBD |
|
||||
| Hostname | TBD |
|
||||
| Public URL | TBD |
|
||||
| SSH | TBD |
|
||||
| OS | TBD |
|
||||
| App user | TBD |
|
||||
| Deployment path | TBD |
|
||||
| Persistent data path | TBD |
|
||||
| API base URL | TBD |
|
||||
| TLS | TBD |
|
||||
| Backup location | TBD |
|
||||
|
||||
## Target Runtime
|
||||
|
||||
Preferred simple runtime for the first cloud deployment:
|
||||
|
||||
```text
|
||||
Django + Gunicorn in Docker Compose
|
||||
```
|
||||
|
||||
Required persistent state:
|
||||
|
||||
```text
|
||||
deploy/data/db.sqlite3
|
||||
deploy/data/artifacts_store
|
||||
```
|
||||
|
||||
Do not bake persistent data into the image.
|
||||
|
||||
## Environment
|
||||
|
||||
Expected production environment values:
|
||||
|
||||
```text
|
||||
DJANGO_DEBUG=0
|
||||
DJANGO_ALLOWED_HOSTS=<hostnames and IPs>
|
||||
DAYBOOK_API_TOKEN=<write token>
|
||||
DAYBOOK_DATA_DIR=/data
|
||||
DATABASE_PATH=/data/db.sqlite3
|
||||
ARTIFACTS_ROOT=/data/artifacts_store
|
||||
```
|
||||
|
||||
## Deployment Flow
|
||||
|
||||
Initial deployment checklist:
|
||||
|
||||
1. Provision host.
|
||||
2. Install Docker and Docker Compose plugin.
|
||||
3. Copy or clone Daybook source.
|
||||
4. Create production `.env`.
|
||||
5. Create persistent `deploy/data` directory.
|
||||
6. Start with `docker compose -f deploy/docker-compose.yml up -d --build`.
|
||||
7. Verify `/api/capabilities`.
|
||||
8. Publish a smoke artifact.
|
||||
9. Configure backups for `deploy/data`.
|
||||
|
||||
## Health Checks
|
||||
|
||||
```bash
|
||||
curl -fsS <api-base-url>/api/capabilities
|
||||
docker compose -f deploy/docker-compose.yml ps
|
||||
test -f deploy/data/db.sqlite3
|
||||
test -d deploy/data/artifacts_store
|
||||
```
|
||||
|
||||
## Open Decisions
|
||||
|
||||
| Decision | Options | Choice |
|
||||
|---|---|---|
|
||||
| Hosting provider | VPS, home tunnel, managed container host | TBD |
|
||||
| Domain | Existing domain, subdomain, direct IP | TBD |
|
||||
| TLS | Reverse proxy, provider load balancer, Tailscale-only | TBD |
|
||||
| Backups | Host cron, provider snapshots, object storage archive | TBD |
|
||||
| Database | SQLite for MVP, Postgres later | TBD |
|
||||
| Reader auth | None for MVP, basic auth, app auth | TBD |
|
||||
145
_archive_/hosts/nuc-daybook.md
Normal file
145
_archive_/hosts/nuc-daybook.md
Normal file
|
|
@ -0,0 +1,145 @@
|
|||
# NUC Daybook Host
|
||||
|
||||
Current Daybook deployment target for fast local iteration.
|
||||
|
||||
Last checked: 2026-06-11.
|
||||
|
||||
## Summary
|
||||
|
||||
| Item | Value |
|
||||
|---|---|
|
||||
| Proxmox host | `pve`, Intel NUC5i3MYHE, Proxmox VE 9.1.0 / Debian 13 |
|
||||
| Host LAN IP | `192.168.1.6` |
|
||||
| Host Tailscale IP | `100.76.55.68` |
|
||||
| Host SSH | `claude@proxmox.cygnus.internal` or `claude@nuc.cygnus.internal` |
|
||||
| Container | LXC VMID `128`, hostname `daybook` |
|
||||
| Container IP | `192.168.1.36/24` |
|
||||
| App URL | `http://192.168.1.36:8000/` |
|
||||
| API base URL | `http://192.168.1.36:8000` |
|
||||
| Deployment path | `/opt/daybook` |
|
||||
| Persistent data path | `/opt/daybook/deploy/data` |
|
||||
| Local source tree | `C:\Users\ritte\_PR_DEV_\DEV_WEB_APPS\AGENT_DAYBOOK` |
|
||||
| NUC ops repo | `C:\Users\ritte\_PR_DEV_\LIVE_ADMIN\NUC_SERVER` |
|
||||
|
||||
Write requests use the Daybook bearer token configured in `/opt/daybook/deploy/.env` as `DAYBOOK_API_TOKEN`.
|
||||
|
||||
## Runtime Shape
|
||||
|
||||
Daybook runs in Docker Compose inside unprivileged Debian LXC `128` with `nesting=1` enabled.
|
||||
|
||||
Compose root:
|
||||
|
||||
```text
|
||||
/opt/daybook
|
||||
```
|
||||
|
||||
Compose file:
|
||||
|
||||
```text
|
||||
/opt/daybook/deploy/docker-compose.yml
|
||||
```
|
||||
|
||||
Persistent state must stay outside the image:
|
||||
|
||||
```text
|
||||
/opt/daybook/deploy/data
|
||||
```
|
||||
|
||||
That directory contains the SQLite database and stored artifacts.
|
||||
|
||||
## Fast Update Loop
|
||||
|
||||
From the Proxmox host, rebuild the running Daybook service inside CT `128`:
|
||||
|
||||
```bash
|
||||
sudo pct exec 128 -- bash -lc 'cd /opt/daybook && docker compose -f deploy/docker-compose.yml up -d --build'
|
||||
```
|
||||
|
||||
Before copying source or rebuilding, preserve:
|
||||
|
||||
```text
|
||||
/opt/daybook/deploy/.env
|
||||
/opt/daybook/deploy/data
|
||||
```
|
||||
|
||||
The current deployment was copied from the local source tree rather than cloned from a remote Git repository.
|
||||
|
||||
## Health Checks
|
||||
|
||||
From a machine that can reach the LAN:
|
||||
|
||||
```bash
|
||||
curl -fsS http://192.168.1.36:8000/api/capabilities
|
||||
```
|
||||
|
||||
From the Proxmox host:
|
||||
|
||||
```bash
|
||||
sudo pct status 128
|
||||
sudo pct config 128
|
||||
sudo pct exec 128 -- bash -lc 'cd /opt/daybook && docker compose -f deploy/docker-compose.yml ps'
|
||||
sudo pct exec 128 -- bash -lc 'test -f /opt/daybook/deploy/data/db.sqlite3 && test -d /opt/daybook/deploy/data/artifacts_store'
|
||||
```
|
||||
|
||||
Storage check:
|
||||
|
||||
```bash
|
||||
sudo /sbin/lvs -o vg_name,lv_name,lv_size,data_percent pve/data pve2/data
|
||||
```
|
||||
|
||||
Important: `local-lvm` / `pve/data` was near the alert threshold at last check. New larger VM/CT disks should normally go on `local-lvm2`. Daybook already uses `local-lvm2`.
|
||||
|
||||
## Smoke Publish
|
||||
|
||||
Use this after ingest, rendering, or deployment changes. Replace the token with the value from `/opt/daybook/deploy/.env` if it changes.
|
||||
|
||||
```bash
|
||||
curl -fsS -X POST http://192.168.1.36:8000/api/artifacts \
|
||||
-H "Authorization: Bearer $DAYBOOK_API_TOKEN" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
"persona": "deploy-smoke",
|
||||
"source_type": "agent",
|
||||
"source_name": "Deployment Smoke Agent",
|
||||
"kind": "markdown",
|
||||
"theme": "report",
|
||||
"title": "Deployment Smoke Test",
|
||||
"content": "# Deployment Smoke Test\n\nDaybook accepted an artifact.",
|
||||
"tags": ["deploy", "smoke"],
|
||||
"metadata": {"run_id": "deploy-smoke-001"}
|
||||
}'
|
||||
```
|
||||
|
||||
The response should include `id`, `url`, `api_url`, and `raw_url`. Open the returned `url` or refresh the feed.
|
||||
|
||||
## Backup Target
|
||||
|
||||
Back up this directory:
|
||||
|
||||
```text
|
||||
/opt/daybook/deploy/data
|
||||
```
|
||||
|
||||
Quick host-side backup command:
|
||||
|
||||
```bash
|
||||
sudo pct exec 128 -- bash -lc 'tar -czf /tmp/daybook-data-$(date +%Y%m%d-%H%M%S).tar.gz -C /opt/daybook/deploy data'
|
||||
```
|
||||
|
||||
For heavy write activity, stop the Compose service before archiving and start it again afterward.
|
||||
|
||||
## Related Docs
|
||||
|
||||
Broader deployment handoff:
|
||||
|
||||
```text
|
||||
planning/daybook-container-handoff.md
|
||||
```
|
||||
|
||||
NUC infrastructure docs:
|
||||
|
||||
```text
|
||||
C:\Users\ritte\_PR_DEV_\LIVE_ADMIN\NUC_SERVER\knowledge_base\containers\128-daybook.md
|
||||
C:\Users\ritte\_PR_DEV_\LIVE_ADMIN\NUC_SERVER\knowledge_base\daybook\api.md
|
||||
C:\Users\ritte\_PR_DEV_\LIVE_ADMIN\NUC_SERVER\knowledge_base\daybook\agent-posting.md
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue