From c281b2b56dcca2df37391a4f66e56722cde5ab45 Mon Sep 17 00:00:00 2001 From: Xika Date: Wed, 1 Jul 2026 01:02:00 +0000 Subject: [PATCH] fix(deploy): write status before self-restarting deploy-hook The deploy-hook container was killing itself before write_status ran, leaving last_deploy=null on every successful deploy. Move health check and write_status before the detached nohup restart of the deploy-hook container so status is persisted even when the container recreates itself. Co-Authored-By: Paperclip --- deploy/deploy-pull.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/deploy/deploy-pull.sh b/deploy/deploy-pull.sh index 1e2c505..524b1ba 100644 --- a/deploy/deploy-pull.sh +++ b/deploy/deploy-pull.sh @@ -56,10 +56,10 @@ log "Building API + worker ($GIT_SHA)" log "Building admin UI ($GIT_SHA)" $COMPOSE build --build-arg GIT_SHA="$GIT_SHA" web $COMPOSE up -d --force-recreate web - log "Refreshing deploy-hook" - $COMPOSE build deploy-hook - $COMPOSE up -d --force-recreate deploy-hook curl -sf --max-time 10 http://127.0.0.1:8000/api/health >/dev/null write_status "ok $GIT_SHA $(date -Iseconds)" log "Deploy OK ($GIT_SHA)" + log "Refreshing deploy-hook (self-restart — runs detached)" + $COMPOSE build deploy-hook + nohup $COMPOSE up -d --force-recreate deploy-hook & } >> "$LOG_FILE" 2>&1