From 8a1599412dd05b20d0471d0f784fa3176f2ddffb Mon Sep 17 00:00:00 2001 From: Maurice Dellin Date: Fri, 31 Jul 2026 12:18:13 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20detach=20stdin=20from=20the=20migrate=20?= =?UTF-8?q?run=20=E2=80=94=20it=20swallowed=20the=20deploy=20script?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The remote half of deploy.sh arrives on stdin via the ssh heredoc. `docker compose run` without -T attaches the migrate container to that stdin, so it consumes the rest of the script: bash hits EOF right after the migration, `up -d web` and the health poll never run, and the job exits 0 — a silent no-op deploy that reports success. Only stateful apps (§ 6.2 PLX) declare a migrate service, which is why the stateless plexus-ms.org deploys never surfaced this. Fixes #1 Co-Authored-By: Claude Fable 5 --- scripts/deploy.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/deploy.sh b/scripts/deploy.sh index 61456e5..4818520 100755 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -92,7 +92,10 @@ IMAGE="$IMAGE" dc pull web # flag is only needed for the existence check, since `config --services` # hides profiled services by default. if IMAGE="$IMAGE" dc --profile migrate config --services 2>/dev/null | grep -qx migrate; then - IMAGE="$IMAGE" dc run --rm migrate + # -T: never attach stdin — this script itself arrives on stdin (ssh heredoc), + # and an attached migrate container would swallow the remaining lines, + # silently skipping `up` and the health poll (plexus-ms/ci-cd#1). + IMAGE="$IMAGE" dc run -T --rm migrate fi IMAGE="$IMAGE" dc up -d web