fix(docker): create /.archon subdirs in entrypoint for bind mounts (#1260)#1272
fix(docker): create /.archon subdirs in entrypoint for bind mounts (#1260)#1272
Conversation
…1260) Named volumes inherit /.archon/workspaces and /.archon/worktrees from the image layer on first run, but bind mounts do not. Without these directories, the Claude subprocess is spawned with a non-existent cwd and fails silently, causing the 60s first-event timeout. Adding mkdir -p in the entrypoint is idempotent for named volumes and fixes bind-mount setups (e.g. ARCHON_DATA pointing to a host path on macOS/Linux).
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe docker-entrypoint.sh script now creates the Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Code ReviewTarget: PR #1272 — SummaryMinimal, correct fix for a real bug. The root cause in #1260 is verified: Implementation Context
Critical IssuesNone. High PriorityNone. Medium PriorityNone. Low Priority / NitsNone worth raising. The comment already captures the non-obvious "why" (bind mount vs named volume semantics), which is exactly what CLAUDE.md asks for. Edge Cases Considered
Placement RationaleThe When running as root, the dirs are created as root and the subsequent Validation Results
The only way to meaningfully validate this change is a Docker-based smoke test (named volume + bind mount), which is documented in the PR test plan for a human to run. Pattern Compliance
What's Good
RecommendationAPPROVE This is a textbook small fix — correct diagnosis, minimal change, right placement, good comment. The only thing a human still needs to do is the bind-mount smoke test on a Linux or macOS Docker host to confirm end-to-end. |
…bind-mount-dirs fix(docker): create /.archon subdirs in entrypoint for bind mounts (coleam00#1260)
Summary
Fixes #1260 — Docker bind mounts break startup because
/.archon/workspacesdoes not exist inside the container, causing the Claude subprocess to spawn with a missing cwd and silently time out after 60s.Root Cause
/.archon/workspacesand/.archon/worktreesviaRUN mkdir -p(Dockerfile:125).orchestrator-agent.tsthen spawns Claude with a non-existent cwd and the SDK fails silently.Fix
Add
mkdir -p /.archon/workspaces /.archon/worktreesat the top ofdocker-entrypoint.sh(before thechown). This is:chown -Rh appuser:appuser /.archon, so freshly-created dirs get the right ownershipTest Plan
docker compose up -dwithARCHON_DATAunset (named volume): app starts, messages get responses (no regression)docker compose up -dwithARCHON_DATA=/some/empty/host/path(bind mount): app starts, sending "hi" in the Web UI gets a response (previously timed out)/.archon/workspacesand/.archon/worktreesexist inside the container and are owned byappuserin both casesSummary by CodeRabbit