Skip to content

feat(demo): read-only demo mode and :demo image - #124

Merged
btouchard merged 3 commits into
mainfrom
033-demo-mode
Sep 28, 2026
Merged

btouchard merged 3 commits into
mainfrom
033-demo-mode

Conversation

@btouchard

Copy link
Copy Markdown
Contributor

Adds a read-only demo mode so Maintenant can run as a public demo
(demo.maintenant.dev) against the fake Docker daemon from maintenant-demo.

A binary built with DEMO_MODE=true:

  • refuses every mutating request with 403 DEMO_MODE, except for requests
    carrying MAINTENANT_DEMO_TOKEN, which the demo driver uses to seed data;
  • closes the ping, MCP, OAuth and agent gRPC surfaces;
  • turns off outbound heartbeats entirely: no routes and no send loop, so the
    instance never calls URLs that come from outside;
  • only starts against a remote Docker endpoint (DOCKER_HOST=tcp://), never a
    local socket or a Kubernetes cluster.

The SPA shows a persistent demo banner, turns 403 responses into toasts and
hides the Outgoing heartbeats tab.

CI builds the same Dockerfile with DEMO_MODE=true on every published,
non-prerelease release and publishes it as ghcr.io/kolapsis/maintenant:demo.
The signed release image and its attestations are unchanged.

A binary linked with DEMO_MODE=true refuses every mutating request with
403 DEMO_MODE, closes the ping, MCP and OAuth surfaces, and only accepts
a remote Docker endpoint (DOCKER_HOST=tcp://) so a demo instance can
never reach a local socket or a cluster. A driver token
(MAINTENANT_DEMO_TOKEN) lets the seeding job write through the guard.

The SPA reads the edition payload, shows a persistent banner and turns
the 403 into a toast instead of an error. CI builds the same Dockerfile
a second time on push to main and publishes it as the `:demo` tag,
without touching the outputs release.yml signs.
Demo mode now leaves the outbound heartbeat routes unregistered and never
starts the send loop, so a demo instance cannot reach out to arbitrary
URLs, even with the demo token. The Heartbeats page hides the Outgoing tab.

The :demo image is now built on each published, non-prerelease release
instead of on every push to main.
Add the Outbound Heartbeats section the Heartbeats page links to, list its
endpoints in the API reference, and state that the daemon must expose
Docker API 1.40 or later (Docker 19.03+).
@btouchard
btouchard merged commit 792ea6a into main Sep 28, 2026
22 checks passed
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