headroom/docker/docker-compose.native.yml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

45 lines
2.1 KiB
YAML
Raw Permalink Normal View History

services:
cli:
fix(install): default docker image to headroomlabs-ai GHCR registry (#1867) (#2039) ## Description The GitHub repository was transferred from `chopratejas/headroom` to `headroomlabs-ai/headroom`. GitHub 301-redirects transferred repos for web and git operations, but **GitHub Container Registry (GHCR) does not** — the old package `ghcr.io/chopratejas/headroom` is now orphaned and frozen (its `latest` tag stopped advancing at `0.27.0`), while CI publishes new images to `ghcr.io/headroomlabs-ai/headroom` (the workflow derives the path from `${{ github.repository }}`). Headroom's install tooling still defaulted to the dead path, so `headroom install apply --preset persistent-docker`, `headroom init`, and the standalone install scripts all pulled a stale `0.27.0` image instead of the current release. This changes every docker-image **default** to `ghcr.io/headroomlabs-ai/headroom:latest`. Closes #1867 ## Type of Change - [x] Bug fix (non-breaking change that fixes an issue) - [ ] New feature (non-breaking change that adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Documentation update - [ ] Performance improvement - [ ] Code refactoring (no functional changes) ## Changes Made - `headroom/install/models.py` — `InstallManifest.image` default. - `headroom/cli/install.py` — `--image` Click option default. - `headroom/cli/init.py` — two `InstallManifest(...)` image args. - `scripts/install.sh` / `scripts/install.ps1` — `IMAGE_DEFAULT` / `$ImageDefault` plus the `--image` help-text default. - `docker/docker-compose.native.yml` — image default in both services. - `tests/test_install/test_planner.py` (4) and `tests/test_install/test_runtime.py` (5) — updated the assertions that pinned the old image (including `assert "<image>" in command`), so they now verify the corrected registry threads through the planner and docker runtime command. Scope note: `github.com/chopratejas/...` links and the plugin marketplace slug are intentionally **not** changed — GitHub redirects those, so they still work. Only the genuinely-dead GHCR image references are touched. No new dependency, no new abstraction. ## Testing - [x] Unit tests pass (`pytest`) - [x] Linting passes (`ruff check .`) - [ ] Type checking passes (`mypy headroom`) - [x] New tests added for new functionality - [x] Manual testing performed ### Test Output ```text $ uv run pytest tests/test_install/ -q 99 passed, 1 skipped in 48.34s $ uv run ruff check headroom/install/models.py headroom/cli/install.py headroom/cli/init.py All checks passed! $ grep -rn "ghcr.io/chopratejas/headroom" headroom/ scripts/ docker/ tests/ # (no source matches — every default now points at headroomlabs-ai) ``` The install-test assertions pinned the old image, so they fail against the old defaults and pass after the fix — they are the regression guard. ## Real Behavior Proof - **Environment:** Windows 11, Python 3.13.5, headroom installed from this branch (editable, via `uv`). - **Exact command / steps:** The dead-registry claim is verifiable at the registry level, independent of a release: ```text docker pull ghcr.io/chopratejas/headroom:latest # old default → 0.27.0 (frozen / orphaned) docker pull ghcr.io/headroomlabs-ai/headroom:latest # new default → current release ``` And the install pipeline now emits the correct image (covered by `tests/test_install/test_runtime.py`, which asserts the resolved docker command contains `ghcr.io/headroomlabs-ai/headroom:latest`). - **Observed result:** `grep` confirms no `ghcr.io/chopratejas/headroom` default remains in code, scripts, compose, or tests; `tests/test_install/` is green (99 passed) with the corrected image asserted end-to-end through planner → runtime command. - **Not tested:** A live `docker pull` of both tags on this specific machine (no local Docker daemon guaranteed) — the registry difference is reproducible by anyone running the two `docker pull` commands above; and an end-to-end `headroom install apply --preset persistent-docker` against a real Docker host. ## Review Readiness - [x] I have performed a self-review - [x] This PR is ready for human review ## Checklist - [x] My code follows the project's style guidelines - [x] I have performed a self-review of my code - [x] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes - [x] I have updated the CHANGELOG.md if applicable ## Screenshots (if applicable) N/A ## Additional Notes - Documentation checklist item is N/A — no user-facing docs surface beyond the CHANGELOG entry. - `mypy` left unchecked — not run as part of this verification; the change is a string-default swap with no type-level surface. - The `--image` help text and `docker-compose.native.yml` were included so every user-facing default is consistent; only the dead GHCR image string was changed. Co-authored-by: JerrettDavis <mxjerrett@gmail.com> Co-authored-by: Tejas Chopra <chopratejas@gmail.com>
2026-07-13 23:31:28 +05:30
image: ${HEADROOM_IMAGE:-ghcr.io/headroomlabs-ai/headroom:latest}
entrypoint: ["headroom"]
working_dir: /workspace
stdin_open: true
tty: true
environment:
HOME: /tmp/headroom-home
# Canonical Headroom filesystem contract (issue #175). Forwarded into
# the container so the proxy resolves state/config to the bind-mounted
# /tmp/headroom-home/.headroom path. HEADROOM_WORKSPACE (above) remains
# the Docker bind-mount source and is intentionally different.
HEADROOM_WORKSPACE_DIR: /tmp/headroom-home/.headroom
HEADROOM_CONFIG_DIR: /tmp/headroom-home/.headroom/config
volumes:
- ${HEADROOM_WORKSPACE:-.}:/workspace
- ${HEADROOM_HOST_HOME:?set HEADROOM_HOST_HOME}/.headroom:/tmp/headroom-home/.headroom
- ${HEADROOM_HOST_HOME:?set HEADROOM_HOST_HOME}/.claude:/tmp/headroom-home/.claude
- ${HEADROOM_HOST_HOME:?set HEADROOM_HOST_HOME}/.codex:/tmp/headroom-home/.codex
- ${HEADROOM_HOST_HOME:?set HEADROOM_HOST_HOME}/.gemini:/tmp/headroom-home/.gemini
command: ["--help"]
proxy:
fix(install): default docker image to headroomlabs-ai GHCR registry (#1867) (#2039) ## Description The GitHub repository was transferred from `chopratejas/headroom` to `headroomlabs-ai/headroom`. GitHub 301-redirects transferred repos for web and git operations, but **GitHub Container Registry (GHCR) does not** — the old package `ghcr.io/chopratejas/headroom` is now orphaned and frozen (its `latest` tag stopped advancing at `0.27.0`), while CI publishes new images to `ghcr.io/headroomlabs-ai/headroom` (the workflow derives the path from `${{ github.repository }}`). Headroom's install tooling still defaulted to the dead path, so `headroom install apply --preset persistent-docker`, `headroom init`, and the standalone install scripts all pulled a stale `0.27.0` image instead of the current release. This changes every docker-image **default** to `ghcr.io/headroomlabs-ai/headroom:latest`. Closes #1867 ## Type of Change - [x] Bug fix (non-breaking change that fixes an issue) - [ ] New feature (non-breaking change that adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Documentation update - [ ] Performance improvement - [ ] Code refactoring (no functional changes) ## Changes Made - `headroom/install/models.py` — `InstallManifest.image` default. - `headroom/cli/install.py` — `--image` Click option default. - `headroom/cli/init.py` — two `InstallManifest(...)` image args. - `scripts/install.sh` / `scripts/install.ps1` — `IMAGE_DEFAULT` / `$ImageDefault` plus the `--image` help-text default. - `docker/docker-compose.native.yml` — image default in both services. - `tests/test_install/test_planner.py` (4) and `tests/test_install/test_runtime.py` (5) — updated the assertions that pinned the old image (including `assert "<image>" in command`), so they now verify the corrected registry threads through the planner and docker runtime command. Scope note: `github.com/chopratejas/...` links and the plugin marketplace slug are intentionally **not** changed — GitHub redirects those, so they still work. Only the genuinely-dead GHCR image references are touched. No new dependency, no new abstraction. ## Testing - [x] Unit tests pass (`pytest`) - [x] Linting passes (`ruff check .`) - [ ] Type checking passes (`mypy headroom`) - [x] New tests added for new functionality - [x] Manual testing performed ### Test Output ```text $ uv run pytest tests/test_install/ -q 99 passed, 1 skipped in 48.34s $ uv run ruff check headroom/install/models.py headroom/cli/install.py headroom/cli/init.py All checks passed! $ grep -rn "ghcr.io/chopratejas/headroom" headroom/ scripts/ docker/ tests/ # (no source matches — every default now points at headroomlabs-ai) ``` The install-test assertions pinned the old image, so they fail against the old defaults and pass after the fix — they are the regression guard. ## Real Behavior Proof - **Environment:** Windows 11, Python 3.13.5, headroom installed from this branch (editable, via `uv`). - **Exact command / steps:** The dead-registry claim is verifiable at the registry level, independent of a release: ```text docker pull ghcr.io/chopratejas/headroom:latest # old default → 0.27.0 (frozen / orphaned) docker pull ghcr.io/headroomlabs-ai/headroom:latest # new default → current release ``` And the install pipeline now emits the correct image (covered by `tests/test_install/test_runtime.py`, which asserts the resolved docker command contains `ghcr.io/headroomlabs-ai/headroom:latest`). - **Observed result:** `grep` confirms no `ghcr.io/chopratejas/headroom` default remains in code, scripts, compose, or tests; `tests/test_install/` is green (99 passed) with the corrected image asserted end-to-end through planner → runtime command. - **Not tested:** A live `docker pull` of both tags on this specific machine (no local Docker daemon guaranteed) — the registry difference is reproducible by anyone running the two `docker pull` commands above; and an end-to-end `headroom install apply --preset persistent-docker` against a real Docker host. ## Review Readiness - [x] I have performed a self-review - [x] This PR is ready for human review ## Checklist - [x] My code follows the project's style guidelines - [x] I have performed a self-review of my code - [x] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes - [x] I have updated the CHANGELOG.md if applicable ## Screenshots (if applicable) N/A ## Additional Notes - Documentation checklist item is N/A — no user-facing docs surface beyond the CHANGELOG entry. - `mypy` left unchecked — not run as part of this verification; the change is a string-default swap with no type-level surface. - The `--image` help text and `docker-compose.native.yml` were included so every user-facing default is consistent; only the dead GHCR image string was changed. Co-authored-by: JerrettDavis <mxjerrett@gmail.com> Co-authored-by: Tejas Chopra <chopratejas@gmail.com>
2026-07-13 23:31:28 +05:30
image: ${HEADROOM_IMAGE:-ghcr.io/headroomlabs-ai/headroom:latest}
entrypoint: ["headroom", "proxy"]
working_dir: /workspace
restart: unless-stopped
environment:
HOME: /tmp/headroom-home
HEADROOM_HOST: 0.0.0.0
# Canonical Headroom filesystem contract (issue #175). See `cli` service
# above for rationale.
HEADROOM_WORKSPACE_DIR: /tmp/headroom-home/.headroom
HEADROOM_CONFIG_DIR: /tmp/headroom-home/.headroom/config
ports:
- "${HEADROOM_PORT:-8787}:${HEADROOM_PORT:-8787}"
volumes:
- ${HEADROOM_WORKSPACE:-.}:/workspace
- ${HEADROOM_HOST_HOME:?set HEADROOM_HOST_HOME}/.headroom:/tmp/headroom-home/.headroom
- ${HEADROOM_HOST_HOME:?set HEADROOM_HOST_HOME}/.claude:/tmp/headroom-home/.claude
- ${HEADROOM_HOST_HOME:?set HEADROOM_HOST_HOME}/.codex:/tmp/headroom-home/.codex
- ${HEADROOM_HOST_HOME:?set HEADROOM_HOST_HOME}/.gemini:/tmp/headroom-home/.gemini
command: ["--host", "0.0.0.0", "--port", "${HEADROOM_PORT:-8787}"]