Skip to content

feat(demo): live demo on rootless Podman behind a Cloudflare Tunnel - #12

Merged
darkstardevx merged 2 commits into
mainfrom
feat/live-demo
Nov 20, 2026
Merged

darkstardevx merged 2 commits into
mainfrom
feat/live-demo

Conversation

@darkstardevx

Copy link
Copy Markdown
Contributor

Adds everything needed to run a public live demo of four NovaStack-generated apps from blackbox, with no open ports.

Hostname App
rest-demo.cybercoretech.net rest + Postgres + auth + otel (/metrics blocked at the tunnel)
htmx-demo.cybercoretech.net htmx + Postgres + auth
live-demo.cybercoretech.net realtime (WebSocket + SSE)
grpc-demo.cybercoretech.net:443 grpc (reflection; grpcurl … list)

How it runs (demo/)

  • Rootless Podman Quadlet units: systemd user services, no sudo, no root daemon, nothing in /etc; start at boot through lingering (already on for raven).
  • Networks: apps ↔ cloudflared on an internal network; Postgres on a separate internal network that cloudflared isn't on; only cloudflared has egress. No unit publishes a port.
  • Hardening: read-only root fs, --cap-drop all (Postgres keeps CHOWN/DAC_OVERRIDE/FOWNER/SETGID/SETUID), no-new-privileges, memory/CPU/pid limits, health checks.
  • Updates: images from GHCR with AutoUpdate=registry; podman-auto-update.timer pulls a new :latest daily.
  • Nightly reset at 04:00 (systemd user timer truncating items, todos, users).
  • install.sh (--check / install / --uninstall): generates the DB password and JWT secrets once (mode 600, never printed); checks the tunnel token's shape without printing it.
  • demo/README.md documents the Cloudflare setup (routes, gRPC/HTTP2, rate-limit rule), GHCR visibility and day-to-day commands.

CI

  • demo-images.yml: builds each demo image with this commit's NovaStack, runs it like the host does (read-only, no caps, Postgres where needed) and passes the docker-smoke.sh HTTP checks. Publishes :latest + version on a release, :latest + sha-… on a manual run from main, never on PRs (it runs on this PR to test the images).
  • ci.yml → demo units: Podman 5.8 Quadlet dry-run (all six services generated, no published ports), shellcheck, systemd-analyze verify.

Verified locally

  • Quadlet -dryrun with Podman 6.1.4 (blackbox) and 5.8.7 (CI image): all units accepted.
  • shellcheck, systemd-analyze verify (only "demo-postgres.service not found", expected before install).
  • Hardened Postgres container on an internal network: init script creates rest + htmx; reset SQL is a no-op on an empty DB and empties populated tables.

After merge

  1. Publish images: run Demo images from main (or wait for the next release), then make the four novastack-demo-* packages public.
  2. Deploy on blackbox with demo/install.sh (needs the real tunnel token in ~/.config/novastack-demo/tunnel.env), then verify every hostname from outside.
  3. Site PR: "Live demo" section.

👻 Code & Design by Darkstardevx 🤖 Generated with Claude Code

darkstardevx and others added 2 commits November 19, 2026 17:40
Four generated apps (rest, htmx, realtime, grpc) served at
{rest,htmx,live,grpc}-demo.cybercoretech.net from a home host, with no
open ports.

demo/
- quadlet/: systemd user units (rootless Podman, no sudo, start at
  boot via lingering). Internal networks: apps <-> cloudflared, and a
  separate db network for postgres <-> rest/htmx. Only cloudflared has
  an egress network; no unit publishes a port. Read-only root fs, all
  caps dropped (postgres keeps 5), no-new-privileges, memory/CPU/pid
  limits, health checks, AutoUpdate=registry.
- systemd/: nightly 04:00 reset timer (TRUNCATE items/todos/users).
- install.sh: --check / install / --uninstall; generates DB password and
  JWT secrets once (mode 600, never printed), shape-checks the tunnel
  token without reading it out, enables reset + podman-auto-update.
- README: dashboard setup (routes incl. /metrics 404, HTTP/2 origin for
  gRPC, zone gRPC, rate-limit rule), GHCR visibility, operations.

CI
- demo-images.yml: builds each demo image with this commit's novastack,
  runs it read-only with no caps (plus postgres) and passes the
  docker-smoke HTTP checks; publishes :latest + version on release,
  :latest + sha on main dispatch, never on PRs.
- ci.yml "demo units": Podman 5.8 quadlet dry-run (all six services
  generated, no published ports), shellcheck, systemd-analyze verify.

Verified locally: quadlet -dryrun with Podman 6.1.4 and 5.8.7, shellcheck,
systemd-analyze, and the hardened postgres container (init script creates
rest + htmx, reset SQL is a no-op on empty and truncates when populated).

👻 Code & Design by Darkstardevx 🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The runner's own system units print unrelated CPUAccounting warnings.

👻 Code & Design by Darkstardevx 🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@darkstardevx
darkstardevx merged commit 457c010 into main Nov 20, 2026
18 checks passed
@darkstardevx
darkstardevx deleted the feat/live-demo branch November 20, 2026 01:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant