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..."