diff --git a/README.md b/README.md index ab11749..565d14f 100644 --- a/README.md +++ b/README.md @@ -93,7 +93,21 @@ That's it. `pull` grabs the latest images, `up -d` restarts the containers. ### ⚠️ **Stuck on the old version?** -**If the dashboard still shows old data after updating:** +**If `git pull` fails or `docker compose up` keeps building from source instead of pulling images**, your clone predates a March 2026 repository migration that rewrote commit history. A normal `git pull` cannot fix this. Run: + +```bash +# Back up any local config you want to keep (.env, etc.) +cd .. +rm -rf Shadowbroker +git clone https://github.com/BigBodyCobain/Shadowbroker.git +cd Shadowbroker +docker compose pull +docker compose up -d +``` + +**How to tell if you're affected:** If `docker compose up` shows `RUN apt-get`, `RUN npm ci`, or `RUN pip install` — it's building from source instead of pulling pre-built images. You need a fresh clone. + +**Other troubleshooting:** * **Force re-pull:** `docker compose pull --no-cache` * **Prune old images:** `docker image prune -f` diff --git a/backend/main.py b/backend/main.py index a1a3944..80e9f26 100644 --- a/backend/main.py +++ b/backend/main.py @@ -12,6 +12,8 @@ from dataclasses import dataclass, field from typing import Any from json import JSONDecodeError +APP_VERSION = "0.9.6" + logging.basicConfig(level=logging.INFO) logger = logging.getLogger(__name__) _start_time = time.time() @@ -6667,6 +6669,7 @@ async def health_check(request: Request): last = d.get("last_updated") return { "status": "ok", + "version": APP_VERSION, "last_updated": last, "sources": { "flights": len(d.get("commercial_flights", [])), diff --git a/backend/services/schemas.py b/backend/services/schemas.py index c707d01..67818c4 100644 --- a/backend/services/schemas.py +++ b/backend/services/schemas.py @@ -4,6 +4,7 @@ from typing import Optional, Dict, List, Any class HealthResponse(BaseModel): status: str + version: str = "" last_updated: Optional[str] = None sources: Dict[str, int] freshness: Dict[str, str] diff --git a/compose.sh b/compose.sh index 1594c99..255c94a 100755 --- a/compose.sh +++ b/compose.sh @@ -45,6 +45,27 @@ if [ ! -f "$COMPOSE_FILE" ]; then exit 1 fi +# Detect stale compose file from pre-migration clones (before March 2026). +# The current compose file uses "image:" to pull pre-built images from GHCR. +# Old versions had "build:" directives that compile from local source — much +# slower and will NOT pick up new releases. +if grep -q '^\s*build:' "$COMPOSE_FILE" 2>/dev/null; then + echo "" + echo "================================================================" + echo " [!] WARNING: Your docker-compose.yml is outdated." + echo "" + echo " It contains 'build:' directives, which means Docker is" + echo " compiling from local source instead of pulling pre-built" + echo " images. You will NOT receive updates this way." + echo "" + echo " Fix: re-clone the repository:" + echo " cd .. && rm -rf $(basename "$SCRIPT_DIR")" + echo " git clone https://github.com/BigBodyCobain/Shadowbroker.git" + echo " cd Shadowbroker && docker compose pull && docker compose up -d" + echo "================================================================" + echo "" +fi + while [ "$#" -gt 0 ]; do case "$1" in --engine) diff --git a/start.bat b/start.bat index 66b01b4..0d25b0e 100644 --- a/start.bat +++ b/start.bat @@ -6,6 +6,26 @@ echo S H A D O W B R O K E R -- STARTUP echo =================================================== echo. +:: Check for stale docker-compose.yml from pre-migration clones +findstr /R /C:"build:" docker-compose.yml >nul 2>&1 +if %errorlevel% equ 0 ( + echo. + echo ================================================================ + echo [!] WARNING: Your docker-compose.yml is outdated. + echo. + echo It contains 'build:' directives, which means Docker will + echo compile from local source instead of pulling pre-built images. + echo You will NOT receive updates this way. + echo. + echo If you use Docker, re-clone the repository: + echo git clone https://github.com/BigBodyCobain/Shadowbroker.git + echo cd Shadowbroker + echo docker compose pull + echo docker compose up -d + echo ================================================================ + echo. +) + :: Check for Python where python >nul 2>&1 if %errorlevel% neq 0 ( diff --git a/start.sh b/start.sh index 844ecf1..42b4096 100644 --- a/start.sh +++ b/start.sh @@ -8,6 +8,24 @@ echo " S H A D O W B R O K E R - macOS / Linux Start " echo "=======================================================" echo "" +# Check for stale docker-compose.yml from pre-migration clones +SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" +if [ -f "$SCRIPT_DIR/docker-compose.yml" ] && grep -q '^\s*build:' "$SCRIPT_DIR/docker-compose.yml" 2>/dev/null; then + echo "" + echo "================================================================" + echo " [!] WARNING: Your docker-compose.yml is outdated." + echo "" + echo " It contains 'build:' directives, which means Docker will" + echo " compile from local source instead of pulling pre-built images." + echo " You will NOT receive updates this way." + echo "" + echo " If you use Docker, re-clone the repository:" + echo " git clone https://github.com/BigBodyCobain/Shadowbroker.git" + echo " cd Shadowbroker && docker compose pull && docker compose up -d" + echo "================================================================" + echo "" +fi + # Check for Node.js if ! command -v npm &> /dev/null; then echo "[!] ERROR: npm is not installed. Please install Node.js 18+ (https://nodejs.org/)"