Skip to content

Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.

fix(docker): persist headroom workspace in compose (#1839)

Vinay Gupta5e29c06aaf5e
diff --git a/docker-compose.yml b/docker-compose.yml
index dbb8b0f9e..3c46ca94d 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -4,6 +4,10 @@ services:
command: ["--host", "0.0.0.0"]
environment:
- HEADROOM_HOST=0.0.0.0
+ - HOME=/home/nonroot
+ # Keep all Headroom read/write state on the named volume below.
+ - HEADROOM_WORKSPACE_DIR=/home/nonroot/.headroom
+ - HEADROOM_CONFIG_DIR=/home/nonroot/.headroom/config
# if you want to use a custom OpenAI-compatible API endpoint,
# uncomment and set the following line with the desired URL
# - OPENAI_TARGET_API_URL=https://api.x.ai
@@ -48,6 +52,6 @@ services:
- NEO4J_apoc_import_file_use__neo4j__config=true
volumes:
- headroom_workspace: # persists proxy_savings, memory.db, session_stats, toin across image updates
+ headroom_workspace: # persists dashboard savings/history, logs, config, memory state, session stats, and TOIN
qdrant_data:
- neo4j_data:
\ No newline at end of file
+ neo4j_data:
diff --git a/tests/test_docker_compose_persistence.py b/tests/test_docker_compose_persistence.py
new file mode 100644
index 000000000..371e98d56
--- /dev/null
+++ b/tests/test_docker_compose_persistence.py
@@ -0,0 +1,16 @@
+"""Regression checks for Docker Compose persistence wiring."""
+
+from __future__ import annotations
+
+from pathlib import Path
+
+ROOT = Path(__file__).resolve().parents[1]
+
+
+def test_top_level_compose_pins_headroom_state_to_named_volume() -> None:
+ compose = (ROOT / "docker-compose.yml").read_text(encoding="utf-8")
+
+ assert "- headroom_workspace:/home/nonroot/.headroom" in compose
+ assert "- HOME=/home/nonroot" in compose
+ assert "- HEADROOM_WORKSPACE_DIR=/home/nonroot/.headroom" in compose
+ assert "- HEADROOM_CONFIG_DIR=/home/nonroot/.headroom/config" in compose