feat: implement 7-phase morning start protocol and enhanced health checks

Co-authored-by: Junie <junie@jetbrains.com>
This commit is contained in:
ja
2026-03-17 16:50:55 +01:00
co-authored by Junie
parent 4c489ded5c
commit d2067dfb91
2 changed files with 164 additions and 79 deletions
+20 -5
View File
@@ -48,14 +48,29 @@ else
echo " Workspace not found at $WORKSPACE" | tee -a "$LOCAL_LOG"
fi
# Phase 2: Docker & Uptime
echo "[Phase 2] Checking services..." | tee -a "$LOCAL_LOG"
# Phase 2: Docker, Uptime & Dependencies
echo "[Phase 2] Checking services & dependencies..." | tee -a "$LOCAL_LOG"
if command -v docker &> /dev/null; then
RUNNING=$(docker ps --format "{{.Names}}" 2>/dev/null | wc -l)
echo " Docker: ${RUNNING} container(s) running" | tee -a "$LOCAL_LOG"
if docker info &> /dev/null; then
RUNNING=$(docker ps --format "{{.Names}}" 2>/dev/null | wc -l)
echo -e " ${GREEN}Docker: ${RUNNING} container(s) running${NC}" | tee -a "$LOCAL_LOG"
else
echo -e " ${YELLOW}Docker: installed but not running${NC}" | tee -a "$LOCAL_LOG"
[ "$WORST_STATE" -lt 1 ] && WORST_STATE=1
fi
else
echo " Docker: not installed" | tee -a "$LOCAL_LOG"
echo -e " ${YELLOW}Docker: not installed${NC}" | tee -a "$LOCAL_LOG"
fi
if [ -f "$WORKSPACE/package.json" ]; then
if [ ! -d "$WORKSPACE/node_modules" ]; then
echo -e " ${RED}CRITICAL: node_modules missing. Run 'npm install' or 'pnpm install'${NC}" | tee -a "$LOCAL_LOG"
WORST_STATE=2
else
echo -e " ${GREEN}Dependencies: OK (node_modules present)${NC}" | tee -a "$LOCAL_LOG"
fi
fi
echo " Uptime: $(uptime -p)" | tee -a "$LOCAL_LOG"
echo "--- Health Check Finished $(date) ---" | tee -a "$LOCAL_LOG"