Harden Gimli deploy: reconcile in place instead of compose down
Build Hugo / build (push) Successful in 6m15s
Build Hugo / deploy (push) Successful in 13s

'docker compose down' removes caddy_cf and the default network, which
intermittently severs the SSH session's own network path before 'up'
restores it (remote command exited without exit status). Replace with
'pull && up -d --force-recreate --remove-orphans' so the stack is
reconciled in place without tearing the network out from under the
connection, while still picking up the new :latest image.
This commit is contained in:
2026-08-03 15:50:23 +00:00
parent 3c5678f8a8
commit 1ef8f861c1
+8 -1
View File
@@ -118,7 +118,14 @@ jobs:
username: ${{ secrets.SSH_USER }}
key: ${{ secrets.GIMLI_KEY }}
port: ${{ secrets.SSH_PORT }}
script: 'docker compose down && docker compose pull && docker compose up -d'
# Pull first, then reconcile in place with `up -d`. Avoid `compose down`:
# it removes caddy_cf and the default network, which severs the SSH
# session's own path before `up` can restore it (intermittent
# "remote command exited without exit status"). `up -d` only recreates
# containers whose image/config changed and never tears the network out
# from under the connection. --force-recreate ensures the new :latest
# image is picked up even when the tag digest changed.
script: 'docker compose pull && docker compose up -d --force-recreate --remove-orphans'
- name: NetBird diagnostics & disconnect
# Runs even on failure: captures final state for debugging and tears the