Docker restart will use the new image that was just built.
Avoids all the network reconnection issues from recreating the container.
Simple and proven to work.
The Docker-in-Docker limitation prevents creating containers with
external networks from within the workflow container. Execute the
deploy commands directly on the NAS host via SSH to avoid this issue.
This is similar to how manual execution works - running docker compose
directly on the host where all networks are accessible.
Replicate the proven approach from deploy-claude-dev-dev.yml:
- Use 'docker rm -f' to completely remove the old container
- Let compose create a fresh container from scratch
- Avoids the 'stop then recreate' flow that fails with network errors
This works because Docker Compose handles initial network connection
during 'up' differently than reconnection during recreate. The rm -f
approach succeeds even from the workflow container context.
force-recreate still tries to disconnect/reconnect networks which fails.
Use stop then up - compose will detect the image changed and recreate
the container automatically without network issues.
This avoids disconnecting from networks which seems to cause issues
when run from the workflow container. Force recreate updates the
container without removing it first.
The workflow needs to be in the same directory as the compose file
for docker compose to work properly. Manual execution worked, so
replicate that approach.
BuildKit operations (load dockerfile, load context, FROM) are taking 20-80s each
on the NAS due to filesystem/resource constraints. Legacy builder is faster.
Keeping pip mirror optimization which provides the real speed improvement.
- Add /var/run/docker.sock mount to deploy-dev and deploy workflows
- Fixes docker build hanging indefinitely in CI
- Docker commands need socket access to communicate with daemon
Ensure dashboard deploy workflows copy tracked compose files into /nas-dashboard before docker compose up, so new SSH host mounts/envs (like Mac terminal) actually reach runtime.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Delete any existing claude-dev container before compose up so name conflicts do not block CI deployment.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Create /claude-dev-runtime before writing previous-image.txt so post-build record step does not fail when the bind path is absent.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Drop the server2 preload stage and rely on direct docker build pulls to avoid long-running preload stream stalls in CI.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Drop chmod on the read-only mounted server2 SSH key so preload can execute without failing the workflow before the SSH attempt.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Mount a read-only SSH key into the claude-dev deploy runner container and use it explicitly for server2 preload so the fast-path image transfer can authenticate.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Treat server2 preload as best-effort so missing SSH keys do not fail deployment; fall back to normal registry pull during image build.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace the runner-only host alias with an explicit SSH user@host so the preload step can resolve and stream the base image tar reliably.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Switch claude-dev to node:20-bookworm-slim and preload the base image from server2 in CI to avoid slow pulls on the NAS runner.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Limit workflow path triggers to each workflow file, add concurrency groups to cancel outdated runs, and checkout the exact triggering SHA for deterministic deploys.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Define claude-dev capabilities as a tested contract and deploy immutable tags only after smoke checks so daily tooling upgrades remain CI-first and rollback-safe.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Clone from local Gitea instead of actions/checkout
- Build with legacy builder (DOCKER_BUILDKIT=0) for Docker mirror support
- Use npm China mirror (registry.npmmirror.com) in Dockerfile
- Combined npm install+build in single RUN step
- Removed stale proxy env vars