Add spooler to stack - #36
Merged
Merged
Conversation
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.