From b2a4be0a5dc506be622d9a09dd06598d64b7dbaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20N=C3=A4geli?= Date: Mon, 12 Oct 2026 18:31:21 +0200 Subject: [PATCH] Deploy script: recreate the build agent when its image changed A deploy that rebuilt the agent's image left the runner on the old one: `compose up -d` reported the containers as Running and recreated nothing, so the check after it failed - and deploying again would do the same. The script already knows the image changed when it gets there, so the recreate is forced. Co-Authored-By: Claude Opus 5.5 --- deploy.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/deploy.sh b/deploy.sh index 5fcd6b0..53f4357 100755 --- a/deploy.sh +++ b/deploy.sh @@ -185,8 +185,11 @@ else waited=$((waited + 5)) done + # Forced, because compose does not see the change: an image built by an + # earlier `compose build` leaves `up -d` with the containers "Running", and + # the runner on the image before. That the image changed is known above. say "Restarting the build agent" - docker compose "${FILES[@]}" up -d agent egress-proxy + docker compose "${FILES[@]}" up -d --force-recreate agent egress-proxy fi say "Verifying"