Files
kgva/deploy
karim 51a94b85d3 cms: add openbureau-core CMS (DB-less, auth: local) — vendored at cms/core
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>
2026-06-30 01:52:49 +02:00
..
2026-06-29 01:37:03 +02:00
2026-06-29 01:37:03 +02:00

Deploy

The site is a static Hugo build served by nginx in one container (docker compose up -d --build). Recommended hosting: an LXC on Proxmox, with Caddy in front terminating TLS and reverse-proxying the domain.

Prerequisites

  1. The repo must be on Gitea (e.g. git.kgva.ch/karim/kgva). The REPO URL in provision-lxc.sh and backend.repo in static/admin/config.yml point there.

Safe cutover (no downtime, with rollback)

  1. On the Proxmox node, run (free CTID, new/temporary IP):
    CTID=141 IP=10.0.0.50/24 GW=10.0.0.1 BRIDGE=vmbr0 STORAGE=local-lvm \
      ./provision-lxc.sh
    
  2. Test it directly: curl -I http://10.0.0.50:8080
  3. Point Caddy's upstream at the new IP (deploy/Caddyfile), reload Caddy, open the domain, click around.
  4. Only once it's verified: stop/remove the old container (pct stop <old> && pct destroy <old>), or keep it a day as rollback.

This never deletes the live site before the replacement is proven.

Updating later

pct exec <CTID> -- bash -lc 'cd /opt/kgva && git pull && docker compose up -d --build'

or wire a Gitea Action / webhook to run that on push (see ../ADMIN.md).