Commit Graph
7 Commits
Author SHA1 Message Date
Tam Nhu Tran 7776715eba fix(docker): delegate restart/install to supervisorctl in Docker deployments
The dashboard restart button and install service used local-mode process
management (stopProxy + ensureCliproxyService) which conflicts with
supervisord in Docker deployments. Killing the CLIProxy binary caused the
bootstrap wrapper to exit, supervisord to attempt a restart, but
ensureCliproxyService already spawned an orphaned process on :8317
resulting in EADDRINUSE and supervisord entering FATAL state.

Detect supervisord via /var/run/supervisor.sock and delegate to
supervisorctl restart, matching the pattern already used by
ccs docker update.

Closes #964
2026-04-11 17:50:11 -04:00
Tam Nhu Tran e8b7ac730f fix(docker): wrap session registration in try-catch and narrow ETXTBSY guard
Session registration in spawn handler can throw on lock contention or
disk errors — wrap in try-catch to prevent silent proxy-untracked state.

Narrow EBUSY catch to ETXTBSY only since EBUSY on non-Linux platforms
can mean mount point or directory in use, not running binary. Fix
misleading "skip" comment to say "abort".
2026-03-28 19:00:54 -04:00
Tam Nhu Tran 7d410b26d0 fix(docker): address review findings — PID guard, deleteBinary guard, blocked fallback
- Guard child.pid falsy in bootstrap (PID 0 creates immortal phantom lock)
- Add ETXTBSY/EBUSY guard to deleteBinary() (same vuln as downloadAndInstall)
- Fix error message to suggest container restart (not circular ccs docker update)
- Tighten status.blocked guard to handle missing blocker gracefully
2026-03-28 18:12:18 -04:00
Tam Nhu Tran a0f28f8807 fix(docker): register session lock from bootstrap for proxy discovery
Docker bootstrap spawns CLIProxy but never registered a session lock,
so the dashboard's fallback detection found nothing. Now registers on
spawn and unregisters on close.
2026-03-28 17:55:51 -04:00
Tam Nhu Tran 60167d3f2b fix(docker): use export for remote env vars and increase build timeout
Remote compose commands placed env vars directly before a compound
if/then statement which is invalid bash syntax. Changed to export
statements chained with &&.

Added REMOTE_DOCKER_BUILD_TIMEOUT_MS (5min) for up and update
operations that involve npm install inside the container. Quick
queries (status, config, down) keep the default 30s timeout.

Closes #832
2026-03-28 16:22:17 -04:00
Tam Nhu Tran 5ad4303345 fix(docker): bound blocking command execution
- add default local and remote sync-command timeouts with clearer timeout diagnostics

- remove extra synchronous fs and process.exit patterns from docker assets/bootstrap helpers

- register the docker help handler in CLAUDE.md for the repo help-location reference
2026-03-27 15:05:17 -04:00
Tam Nhu Tran 23f767b0c5 feat(docker): add integrated deployment commands
- add ccs docker subcommands for up, down, status, update, logs, and config
- bundle integrated docker assets and remote ssh deployment support
- add executor regression tests and root help/router coverage

Refs #812
2026-03-27 15:05:17 -04:00