From f11be8735c8968474613ffc43c803d22596ac5e1 Mon Sep 17 00:00:00 2001 From: cynarAI <155274210+cynarAI@users.noreply.github.com> Date: Fri, 23 Oct 2026 10:34:43 +0200 Subject: [PATCH] Keep source bind mounts out of a recreated supervisor container (#227) The supervisor on evo had a bind mount of an old source copy over the image's /app sources. The deploy carried every mount over when it recreated the container, so a rebuilt image never took effect and the fix for missing bot networks stayed inactive. Mounts into /app are now dropped; data and Docker socket mounts are kept. Claude-Session: https://claude.ai/code/session_01QAiXRe1FLMAJT9jkvwFZFq Co-authored-by: Claude --- ops/evo-deploy/deploy.sh | 7 +++++-- packages/testkit/src/evo-deploy.test.ts | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ops/evo-deploy/deploy.sh b/ops/evo-deploy/deploy.sh index ba34854..4762c8b 100755 --- a/ops/evo-deploy/deploy.sh +++ b/ops/evo-deploy/deploy.sh @@ -496,7 +496,7 @@ refresh_supervisor_container() { return 0 fi - local work image network restart retries line + local work image network restart retries line target work="$(mktemp -d)" image="$(docker container inspect -f '{{.Config.Image}}' "$name")" network="$(docker container inspect -f '{{.HostConfig.NetworkMode}}' "$name")" @@ -509,8 +509,11 @@ refresh_supervisor_container() { elif [[ -n "$restart" && "$restart" != no ]]; then args+=(--restart "$restart") fi + # A bind mount over the image's /app would shadow the freshly built sources, so it is not carried over. while IFS= read -r line; do - [[ -n "$line" ]] && args+=(-v "$line") + target="${line%:ro}" + target="${target##*:}" + [[ -n "$line" && "$target" != /app && "$target" != /app/* ]] && args+=(-v "$line") done < <(docker container inspect -f \ '{{range .Mounts}}{{if eq .Type "volume"}}{{.Name}}{{else}}{{.Source}}{{end}}:{{.Destination}}{{if not .RW}}:ro{{end}}{{"\n"}}{{end}}' "$name") while IFS= read -r line; do diff --git a/packages/testkit/src/evo-deploy.test.ts b/packages/testkit/src/evo-deploy.test.ts index c886657..d2eae4c 100644 --- a/packages/testkit/src/evo-deploy.test.ts +++ b/packages/testkit/src/evo-deploy.test.ts @@ -212,7 +212,7 @@ if [[ "$1 $2" == "container inspect" ]]; then *NetworkMode*) echo host ;; *RestartPolicy.Name*) echo unless-stopped ;; *MaximumRetryCount*) echo 0 ;; - *Mounts*) printf '/srv/data:/srv/data\\n/var/run/docker.sock:/var/run/docker.sock\\n' ;; + *Mounts*) printf '/srv/data:/srv/data\\n/var/run/docker.sock:/var/run/docker.sock\\n/srv/old-src:/app/infra/sandboxes/supervisor/src\\n' ;; *Config.Env*) printf 'DATA_DIR=/srv/data\\nPATH=/usr/bin\\nSUPERVISOR_PORT=7091\\n' ;; esac exit 0