Skip to content

Add spooler to stack - #36

Merged
JonJagger merged 3 commits into
mainfrom
add-spooler-to-stack
Jul 28, 2026
Merged

JonJagger merged 3 commits into
mainfrom
add-spooler-to-stack

Conversation

@JonJagger

Copy link
Copy Markdown
Member

No description provided.

  web now persists writes asynchronously via the spooler (web -> spooler ->
  saver), so a self-hosted server started by commander must run the spooler
  alongside the saver.

  Declare the spooler across the docker-compose fragments, mirroring the
  saver but with its own shape: images/container-name/env-files/read_only/
  restart/user, tmp-fs (a writable /sqlite for its buffer plus /tmp, since
  it is read_only), depends-on (spooler -> saver, and web -> spooler), and a
  global swarm block (no persistent volume - the buffer is ephemeral tmpfs
  that drains to the saver). Add it to service_names.

  app/docker-compose/.env: add CYBER_DOJO_SPOOLER_PORT=4539 - the container
  env-file is how web learns where the spooler is (and how the spooler binds),
  a separate channel from image-tag substitution. Drop the vestigial
  REPLER_PORT and VERSION_REPORTER_PORT (no such services in this stack).

  versioner does not emit spooler env-vars yet, so two interim shims bridge
  until it does (both TODO-marked): dot_env.rb appends the spooler image/tag/
  port, and build_fake_versioner_image.sh carries local spike-test pins for
  web and saver so the full async-write path can be exercised locally.

  test/sh/cyber_dojo_helpers.sh: add spooler to the up-test service list, and
  add dashboard too - it was silently missing, so the up-test never verified
  the dashboard container started.

  Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
  The spooler buffered into a tmpfs, so a restart discarded writes web had
  already acked - the opposite of what the buffer exists for. Its own
  config/up.sh expects /sqlite to be a docker volume writable by uid 19664.

  Bind-mount a host dir, mirroring saver: pin the swarm service to the manager
  node holding it, and prepare both dirs in CI (hence the script rename).
@JonJagger
JonJagger merged commit 2f31057 into main Jul 28, 2026
1 check passed
@JonJagger
JonJagger deleted the add-spooler-to-stack branch July 28, 2026 14:01
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