feat(docker): add Compose deployment support

This commit is contained in:
Devvyn
2026-08-27 19:38:38 +08:00
parent a51563ce1f
commit b85f7659b7
16 changed files with 631 additions and 18 deletions
+3 -1
View File
@@ -26,7 +26,9 @@ import { SYNTHETIC_ADMIN, findUser } from '../user-store.js';
// Shared path constants used across route modules. CASES_DIR (project folders)
// stays shared across instances; SETTINGS_PATH is per-instance runtime state.
export const CASES_DIR = join(homedir(), 'codeman-cases');
// Docker Compose deployments set CODEMAN_CASES_PATH to a host-absolute bind
// mount so Docker cases can share the same workspace path with the host daemon.
export const CASES_DIR = process.env.CODEMAN_CASES_PATH || join(homedir(), 'codeman-cases');
export const SETTINGS_PATH = dataPath('settings.json');
/**
+3 -3
View File
@@ -2994,9 +2994,9 @@ export function registerSessionRoutes(
casePath = dockerCase.hostWorkspacePath; // a REAL host dir (bind-mounted into the container)
docker = sessionDocker;
// Seed resume so a relaunch resumes the case's last conversation from the
// bind-mounted transcript (decision: resume-on-start default ON).
if (sessionDocker.resumeOnStart && dockerCase.lastClaudeSessionId) {
// Seed only Claude's resume id. Codex, Gemini, and the other CLIs have
// separate conversation stores and must never receive a Claude UUID.
if (mode === 'claude' && sessionDocker.resumeOnStart && dockerCase.lastClaudeSessionId) {
dockerResumeId = dockerCase.lastClaudeSessionId;
}
} else {