From c42d4491cb72641670cc3409e5cd16e05f7d6234 Mon Sep 17 00:00:00 2001 From: Vadym Samoilenko Date: Thu, 26 Mar 2026 13:57:33 +0000 Subject: [PATCH] fix: correct static file layout for Apache Alias serving Apache serves /cc-dashboard/* from /var/www/html/cc-dashboard/ directly. index.html goes to the root, CSS/JS to static/ subdirectory to match /cc-dashboard/static/... paths referenced in index.html. Co-Authored-By: Claude Sonnet 4.6 --- deploy.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/deploy.sh b/deploy.sh index 08bc7ca..a9bcd2b 100644 --- a/deploy.sh +++ b/deploy.sh @@ -15,8 +15,13 @@ log "Pulling latest code..." git pull # ── 2. Sync static files to web root ──────────────────────────────────────── +# Apache serves /cc-dashboard/* from /var/www/html/cc-dashboard/ +# index.html must be at the root; CSS/JS go into static/ subdir to match +# paths in index.html (/cc-dashboard/static/css/..., /cc-dashboard/static/js/...) log "Syncing static files to $STATIC_DST..." -sudo rsync -a --delete "$STATIC_SRC/" "$STATIC_DST/" +sudo mkdir -p "$STATIC_DST/static" +sudo cp "$STATIC_SRC/index.html" "$STATIC_DST/index.html" +sudo rsync -a --delete --exclude='index.html' "$STATIC_SRC/" "$STATIC_DST/static/" # ── 3. Rebuild app image ───────────────────────────────────────────────────── log "Building app image..."