Context
packages/gittensory-miner already ships a Dockerfile, but DEPLOYMENT.md currently asks operators to hand-assemble their own docker run invocation to run fleet mode (multiple parallel miner workers). No docker-compose file exists for AMS today: the repo-root docker-compose.yml is ORB's own review-stack compose, and the separate miner-ui daemon/launcher issue in Wave 5 covers the webapp, not this CLI.
Dependencies
None — independently shippable; only requires the existing Dockerfile in packages/gittensory-miner, which is already shipped.
Requirements
- Add
packages/gittensory-miner/docker-compose.miner.yml.
- Define a
miner service built from the existing packages/gittensory-miner/Dockerfile.
- Declare a named volume mapped to the package's documented state-dir path (e.g.
/data/miner) for persistence across container restarts.
- Set
restart: unless-stopped on the service.
- Document — in a comment block within the compose file, and in DEPLOYMENT.md — how to use
docker compose -f docker-compose.miner.yml up --scale miner=N to run N parallel workers, including how to partition each worker's config/state dir so parallel workers don't collide on the same SQLite files.
- Reference environment variables via an env file rather than hardcoding credentials or provider config directly into the compose file (pointing at the
.gittensory-miner.env.example starter file from this same batch, if it has already merged, or at the existing env documentation otherwise).
- Update DEPLOYMENT.md's fleet-mode section to point operators at this compose file instead of (or in addition to) the current hand-rolled
docker run instructions.
Deliverables / Acceptance Criteria
Test Coverage Requirements
This PR must ship with full test coverage for every changed line and branch — the repo's Codecov patch gate requires 99%+ coverage and the house standard is to aim for 100%, including both sides of every conditional/nullish-coalescing branch introduced. Because the primary artifact is a docker-compose YAML file rather than application logic, add: (1) a validation test (e.g. invoking docker compose -f docker-compose.miner.yml config or an equivalent YAML-schema check) covering both a default single-instance invocation and a --scale-style multi-instance invocation, to confirm the file parses and the volume/service definitions are well-formed, (2) an invariant test for "the compose file never contains a literal credential value" (a grep-style check for common secret/token patterns run against the committed file), and (3) a regression test is not applicable since this is net-new tooling, not a bug fix — state that explicitly in the PR.
Codecov visibility note: packages/gittensory-miner/**, apps/gittensory-miner-ui/**, and apps/gittensory-miner-extension/** currently sit entirely outside vitest's coverage.include glob, so codecov/patch cannot measure changes there yet — closing that gap is exactly what #4864 and #4865 (in this same milestone) do. Any part of this change under packages/gittensory-engine/src/** or the repo's own src/** remains fully Codecov-instrumented as usual. Either way, this does not lower the bar: treat the 100%-including-invariants-and-regression target above as the enforced house standard regardless of what Codecov can currently see, and it becomes gate-enforced for real once #4864/#4865 ship.
Expected Outcome
An operator running AMS in fleet mode can bring up N parallel miner workers with one docker compose command and a documented --scale pattern, instead of hand-assembling repeated docker run invocations.
Links & Resources
- packages/gittensory-miner/Dockerfile
- packages/gittensory-miner/DEPLOYMENT.md
- See the
.gittensory-miner.env.example issue in this same batch
- Theme: Self-host packaging & docs
Context
packages/gittensory-miner already ships a Dockerfile, but DEPLOYMENT.md currently asks operators to hand-assemble their own
docker runinvocation to run fleet mode (multiple parallel miner workers). No docker-compose file exists for AMS today: the repo-rootdocker-compose.ymlis ORB's own review-stack compose, and the separate miner-ui daemon/launcher issue in Wave 5 covers the webapp, not this CLI.Dependencies
None — independently shippable; only requires the existing Dockerfile in
packages/gittensory-miner, which is already shipped.Requirements
packages/gittensory-miner/docker-compose.miner.yml.minerservice built from the existingpackages/gittensory-miner/Dockerfile./data/miner) for persistence across container restarts.restart: unless-stoppedon the service.docker compose -f docker-compose.miner.yml up --scale miner=Nto run N parallel workers, including how to partition each worker's config/state dir so parallel workers don't collide on the same SQLite files..gittensory-miner.env.examplestarter file from this same batch, if it has already merged, or at the existing env documentation otherwise).docker runinstructions.Deliverables / Acceptance Criteria
packages/gittensory-miner/docker-compose.miner.ymlminerservice built from the existing Dockerfilerestart: unless-stopped--scaleusage documented, including per-worker config/state partitioningTest Coverage Requirements
This PR must ship with full test coverage for every changed line and branch — the repo's Codecov patch gate requires 99%+ coverage and the house standard is to aim for 100%, including both sides of every conditional/nullish-coalescing branch introduced. Because the primary artifact is a docker-compose YAML file rather than application logic, add: (1) a validation test (e.g. invoking
docker compose -f docker-compose.miner.yml configor an equivalent YAML-schema check) covering both a default single-instance invocation and a--scale-style multi-instance invocation, to confirm the file parses and the volume/service definitions are well-formed, (2) an invariant test for "the compose file never contains a literal credential value" (a grep-style check for common secret/token patterns run against the committed file), and (3) a regression test is not applicable since this is net-new tooling, not a bug fix — state that explicitly in the PR.Codecov visibility note:
packages/gittensory-miner/**,apps/gittensory-miner-ui/**, andapps/gittensory-miner-extension/**currently sit entirely outside vitest'scoverage.includeglob, socodecov/patchcannot measure changes there yet — closing that gap is exactly what #4864 and #4865 (in this same milestone) do. Any part of this change underpackages/gittensory-engine/src/**or the repo's ownsrc/**remains fully Codecov-instrumented as usual. Either way, this does not lower the bar: treat the 100%-including-invariants-and-regression target above as the enforced house standard regardless of what Codecov can currently see, and it becomes gate-enforced for real once #4864/#4865 ship.Expected Outcome
An operator running AMS in fleet mode can bring up N parallel miner workers with one
docker composecommand and a documented--scalepattern, instead of hand-assembling repeateddocker runinvocations.Links & Resources
.gittensory-miner.env.exampleissue in this same batch