6 Commits
Author SHA1 Message Date
adamfandClaude Opus 5.5 94a6abba97 Move the notes editor and job tracker to stppriv
Test and deploy / test (push) Successful in 31s
Test and deploy / deploy (push) Successful in 27s
The SilverBullet editor and the job tracker now run on their own LXC
(adamf/stppriv) at priv.<DOMAIN>, behind Cloudflare Access. Here:

- silverbullet and jobs services removed; /sb/, /jobs/ and the old
  /cv/jobs, /cv/leads and userscript URLs 301 to priv.<DOMAIN>
- silverbullet-git runs with SYNC_MODE=pull: stppriv is the vault's only
  writer. The backend's vault mount is read-only.
- jobs env vars, dev overrides and docs removed; edge_test.sh checks
  the new redirects

Merge only after stppriv serves /sb/ and /jobs/ and the jobs data has
been moved.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-26 13:53:48 +00:00
adamfandClaude Opus 5.5 4530cb8dc4 Trim comments to the non-obvious why
Test and deploy / test (push) Successful in 28s
Test and deploy / deploy (push) Successful in 31s
Drop narration, history and restated-code comments across the repo,
keep short ones for security boundaries, upstream quirks and ordering
constraints, and record the convention in CLAUDE.md.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 20:49:03 +00:00
adamfandClaude Opus 5.5 daa2a465fb Cut the edge over from nginx and certbot to Caddy
Test and deploy / test (push) Successful in 3m30s
Test and deploy / deploy (push) Has been cancelled
Caddy takes nginx's place in compose: ports 80/443, the fixed address
172.28.255.251 that cloudflared pins the public names to, the network
aliases, the healthcheck and the autoheal label. nginx and certbot are
removed from compose; Caddy already holds its own certificates in
./caddy/data, obtained while it ran beside nginx. `traffic` now tails
logs/caddy/payloads.log, and the dev override switches Caddy to its dev
sites instead of putting nginx in DEV_MODE.

Docs and comments that described nginx's behaviour now describe Caddy's:
CLAUDE.md, DEPLOYMENT.md (topology, boot paths, TLS, rate limits, runbook
with a rollback, rough edges), the READMEs, .env.example and the comments
in the backend, Python service, Vue source and infra files. nginx/ and
certbot/ stay in the repo as the rollback until this has settled.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-17 23:28:28 +00:00
adamfandClaude Opus 5 507bdb5939 Let the editor request an immediate notes sync
Deploy with Docker Compose / deploy (push) Successful in 9s
Waiting out SILVERBULLET_GIT_INTERVAL is annoying when you want a note on
another device now. The sidecar's sleep is now split into short slices that
watch sync-request.md in the vault; when its modification time changes, it
syncs on the spot. The "Sync notes" toolbar button in the vault's Sync.md
writes that file.

The trigger file is deliberately never deleted here. Deleting it would fight
SilverBullet's client sync, which would re-upload its cached copy and produce
a delete/recreate loop while a tab is open; only the mtime is significant. It
is gitignored in the notes repo, so it never reaches a commit.

Signalling through a file in the shared vault rather than shell.run or a
docker socket: both containers already have that directory, so this adds no
capability to either, which is the same reasoning behind using a sidecar
instead of SilverBullet's own shell backend.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01BCQFvkvorAw1xwhd5gL2qZ
2026-09-22 13:40:51 +01:00
adamfandClaude Opus 5 85ab27d241 Fix silverbullet-git push failing with "No user exists for uid 1000"
Deploy with Docker Compose / deploy (push) Successful in 28s
The sidecar runs as uid 1000 so its commits match the vault's ownership on
the host, but alpine/git has no passwd entry for that uid. ssh resolves the
calling uid before it does anything else and aborts when it cannot, so every
push failed at "No user exists for uid 1000" without reaching the deploy key.

Mount a minimal passwd file that defines the uid. SilverBullet's own entrypoint
creates the user at boot for the same reason; this container has no entrypoint
of its own, so the entry is supplied as a file.

Verified on the Pi: with the mount, ssh authenticates as the silverbullet-git
deploy key; without it, the uid error reproduces.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01BCQFvkvorAw1xwhd5gL2qZ
2026-09-21 15:37:27 +01:00
adamfandClaude Opus 5 fdf76f75e9 Add SilverBullet as a web editor for the Obsidian vault
Deploy with Docker Compose / deploy (push) Successful in 2m17s
Quartz renders the vault but has no write path, so editing a note meant
editing files on the Pi or pushing through git. SilverBullet serves the same
vault as an editable PWA at /sb/, behind the same nginx admin gate /notes/
uses. Quartz stays as the read view; its --serve watcher picks up SilverBullet's
writes, so /notes/ follows within seconds.

The vault is now the `notes` repo rather than `obsidian_vault`, and the
silverbullet-git sidecar commits and pushes what the editor writes while
pulling what Obsidian pushes from elsewhere. The vault's own deploy workflow
has been removed in that repo: it pulled from the old remote and restarted
quartz, and a second git process in the same clone would race the sidecar.

Notes on the configuration:

- Single-space mode, auto-detected because the mounted folder is not empty.
  SilverBullet writes no database or metadata into the vault, so the folder
  stays plain markdown that quartz and Obsidian still understand.
- /sb/ is the one proxied app whose prefix is NOT stripped. SB_URL_PREFIX=/sb
  tells the PWA its own base path and its service-worker scope is built from
  that; stripping the prefix serves a blank page with nothing in the log.
- SB_SPACE_IGNORE mirrors quartz's ignorePatterns and must be newline
  separated. A comma separated list is accepted silently and does nothing.
- No SB_USER is set, so the container is open to anything reaching it on
  app-network. The nginx auth_request gate is the only protection.
- The sidecar runs as uid 1000 to match the vault's ownership, and is a
  separate container rather than SilverBullet's own shell backend, which would
  hand anyone past the nginx gate command execution inside the container.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01BCQFvkvorAw1xwhd5gL2qZ
2026-09-21 15:33:28 +01:00