A deploy waits for the game server to answer and fails with its journal if it does not; a report id is checked whole; the backup's notes say what it keeps

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jm2auWk6RP71CjaAb4FMoG
This commit is contained in:
Eric Wagoner
2026-09-29 12:25:38 -04:00
co-authored by Claude Opus 5.5
parent f78ff3ef8c
commit 60b3c0e60a
4 changed files with 22 additions and 10 deletions
+12 -2
View File
@@ -49,7 +49,17 @@ ssh "root@$HOST" '
systemctl enable --now __SLUG__
systemctl restart __SLUG__
systemctl reload caddy
sleep 1
systemctl --no-pager -l status __SLUG__ | head -3
# "active" means only that the process started: wait for it to answer HTTP,
# so a server that dies loading its code fails the deploy instead of looping.
for i in $(seq 20); do
if curl -s -o /dev/null http://127.0.0.1:__PORT__/api/rooms/ZZZZ; then
systemctl --no-pager -l status __SLUG__ | head -3
exit 0
fi
sleep 1
done
echo "the game server is not answering:" >&2
journalctl -u __SLUG__ -n 25 --no-pager >&2
exit 1
'
echo "deployed."