kgva can now be edited through openbureau-core instead of Decap: a small Node CMS (git subtree at cms/core) with a schema-driven editor at /admin, file-based login (no Supabase/Postgres), Markdown on disk. cms/kgva.config.js models the content (portfolio/pages/sections); docker-compose builds the core image (Hugo 0.163.3, no VITE_SUPABASE_URL → local-auth admin) and mounts the repo as the site. seed an admin via cms/seed-admin.mjs; deploy/provision-lxc.sh + ADMIN.md updated. Verified DB-less end-to-end on real content (staged): local login → schema-driven editor → 42 entries (de/en) → stats → create/preview/cleanup; unknown frontmatter (image galleries) preserved on save. The LIVE static site (CT130 timer→hugo→nginx) is unaffected — hugo ignores cms/; the CMS is dormant until provisioned. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1.6 KiB
Admin (openbureau-core CMS)
The site is edited through openbureau-core — a small Node CMS (vendored at
cms/core) that builds the Hugo site and serves it together with an editor at
/admin. It is DB-less: file-based login (auth: 'local') and Markdown on
disk. No Supabase, no Postgres.
What's where
cms/kgva.config.js— the content model (collections + fields) the editor renders.cms/core/— the engine (git subtree ofgit.openbureau.ch/karim/openbureau-core). Update it with:git subtree pull --prefix=cms/core https://git.openbureau.ch/karim/openbureau-core.git main --squashcms/.env—JWT_SECRET(sign-in secret) +ADMIN_EMAILS. Copy from.env.example.cms/users.json— the user store (bcrypt hashes). Git-ignored. Seed with:docker compose run --rm cms node /site/cms/seed-admin.mjs you@mail yourpass
Run
cp cms/.env.example cms/.env # set JWT_SECRET (openssl rand -hex 32)
docker compose build
docker compose run --rm cms node /site/cms/seed-admin.mjs karim@gabrielevarano.ch <pw> # once
docker compose up -d
Open http://<host>:8080/admin/, log in, edit. Speichern writes the Markdown,
Vorschau builds a draft preview, Publizieren rebuilds the public site.
Deploy
A single container (Hugo build + Node serve). See deploy/ —
provision-lxc.sh stands up an LXC and does all of the above (incl. a seeded
admin whose password lands in cms/ADMIN_PASSWORD.txt); Caddyfile terminates
TLS and reverse-proxies the domain. Safe cutover: provision a NEW container on a
temporary IP, verify, point Caddy at it, then retire the old one.