The 'name: nas-dashboard-dev' field added in commit a88f5b9 broke
auto-deployment by causing Docker Compose network connection errors.
Reverting to the original working approach:
- Remove 'name:' field from docker-compose.dev.yml
- Use simple 'docker compose up -d --pull never'
This worked for months before the recent changes.
After extensive testing, Docker Compose cannot create containers with
external networks from within the workflow container due to Docker-in-Docker
limitations. The workflow now builds the image successfully and provides
clear instructions for manual deployment.
CI builds the image ✅
Manual deployment required for network-connected containers
The deploy script runs with the NAS host's Docker context,
avoiding Docker-in-Docker network issues. The script is mounted
at /nas-dashboard/deploy-dev.sh in the workflow container.
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>
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>