refactor: update dependencies and remove unused code
- Added new dependencies: `adler2`, `crc32fast`, `flate2`, `miniz_oxide`, and `libredox`. - Updated existing dependencies: `tokio-rustls` to version 0.26.4 and `filetime` to version 0.2.27. - Removed the `backup.rs` file as it is no longer needed. - Introduced tests for configuration and credential management. - Enhanced the `identity` module to generate W3C compliant DID documents. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
2a867b32a8
commit
6fee6befed
@@ -63,6 +63,15 @@ if ! ssh $SSH_OPTS -o ConnectTimeout=5 "$TARGET_HOST" "echo ok" >/dev/null 2>&1;
|
||||
exit 1
|
||||
fi
|
||||
echo " Connected."
|
||||
|
||||
# Pre-deploy health check (informational — warns but does not block)
|
||||
TARGET_IP_ONLY="$(echo "$TARGET_HOST" | cut -d@ -f2)"
|
||||
PRE_HEALTH=$(curl -s -o /dev/null -w '%{http_code}' --connect-timeout 5 "http://$TARGET_IP_ONLY/health" 2>/dev/null || echo "000")
|
||||
if [ "$PRE_HEALTH" = "200" ]; then
|
||||
echo " Server health: OK (200)"
|
||||
else
|
||||
echo " ⚠️ Server health: $PRE_HEALTH (may be down or unhealthy — deploying anyway)"
|
||||
fi
|
||||
echo ""
|
||||
|
||||
# When --both: deploy to 228 first, then copy to 198
|
||||
@@ -634,13 +643,32 @@ PYEOF
|
||||
|
||||
fi # end FRONTEND_ONLY guard
|
||||
|
||||
# Post-deploy health check — wait up to 60s for server to come healthy
|
||||
echo ""
|
||||
echo "$(timestamp) 🩺 Post-deploy health check..."
|
||||
HEALTH_OK=false
|
||||
for i in $(seq 1 12); do
|
||||
POST_HEALTH=$(curl -s -o /dev/null -w '%{http_code}' --connect-timeout 5 "http://$TARGET_IP_ONLY/health" 2>/dev/null || echo "000")
|
||||
if [ "$POST_HEALTH" = "200" ]; then
|
||||
echo " Health: OK (200) after $((i * 5))s"
|
||||
HEALTH_OK=true
|
||||
break
|
||||
fi
|
||||
echo " Health: $POST_HEALTH (waiting... ${i}/12)"
|
||||
sleep 5
|
||||
done
|
||||
if [ "$HEALTH_OK" = false ]; then
|
||||
echo " ⚠️ Server did not become healthy within 60s (last: $POST_HEALTH)"
|
||||
echo " Rollback: ssh $TARGET_HOST and check 'sudo journalctl -u archipelago -n 50'"
|
||||
fi
|
||||
|
||||
DEPLOY_END=$(date +%s)
|
||||
DEPLOY_ELAPSED=$((DEPLOY_END - DEPLOY_START))
|
||||
echo ""
|
||||
echo "$(timestamp) ✅ Deployed to live system! (${DEPLOY_ELAPSED}s total)"
|
||||
echo " Backend: $(ssh $SSH_OPTS "$TARGET_HOST" 'sudo systemctl is-active archipelago')"
|
||||
echo " Web UI: http://$(echo $TARGET_HOST | cut -d@ -f2)"
|
||||
echo " PWA install: https://$(echo $TARGET_HOST | cut -d@ -f2) (use HTTPS, accept cert once, then Install app)"
|
||||
echo " Web UI: http://$TARGET_IP_ONLY"
|
||||
echo " PWA install: https://$TARGET_IP_ONLY (use HTTPS, accept cert once, then Install app)"
|
||||
else
|
||||
echo ""
|
||||
echo "✅ Build complete!"
|
||||
|
||||
Reference in New Issue
Block a user