1
0
mirror of git://f0xx.org/ac/ac-deploy synced 2026-07-29 04:19:00 +03:00

Cluster deploy: ac/* only, hub assets, auth routes at project root.

Remove monolith clone path; add hub deploy, legacy purge, composed-backend
login/logout nginx locations, and full hub asset rsync validation.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Anton Afanasyev
2026-06-24 22:53:38 +02:00
committed by Anton Afanasyeu
parent 76d4797cac
commit b47f91b1ab
10 changed files with 156 additions and 138 deletions

View File

@@ -0,0 +1,45 @@
#!/bin/sh
# Deploy ac-be-hub landing to APP_ROOT (hub index.php + full assets tree).
set -eu
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
# shellcheck source=/dev/null
. "$ROOT/scripts/lib/common.sh"
load_cluster_env
WS="${AC_WORKSPACE_ROOT:-/var/www/ac/workspace}"
HUB="${WS}/ac-be-hub"
DEST="${APP_ROOT:-/var/www/localhost/htdocs/apps/app/androidcast_project}"
[ -d "$HUB" ] || die "missing ac-be-hub at $HUB (run deploy-ac-workspace.sh first)"
mkdir -p "$DEST/partials"
for f in index.php index.html hub.css hub-logo-layers.css hub-landing.css landing-pages.inc.php; do
install -m 0644 "$HUB/$f" "$DEST/$f"
done
install -D -m 0644 "$HUB/partials/cookie_consent.php" "$DEST/partials/cookie_consent.php"
# Hub clock/globe/logo layers need the full assets/ tree (SVG alphabets, fragments, optional fonts/).
log "rsync hub assets/"
rsync -a --delete \
--exclude='*.py' \
--exclude='analytics.config.example.js' \
"$HUB/assets/" "$DEST/assets/"
# Hub footer expects platform under android_cast/examples/platform OR ../platform
PLATFORM_SRC="${WS}/ac-platform-php/platform"
PLATFORM_DEST="${DEST}/android_cast/examples/platform"
if [ -d "$PLATFORM_SRC" ]; then
mkdir -p "$(dirname "$PLATFORM_DEST")"
rsync -a --delete "$PLATFORM_SRC/" "$PLATFORM_DEST/"
fi
for _req in \
assets/hub-logo-transparent.svg \
assets/hub-logo-fragment-globe.svg \
assets/overtime-01-alphabet.svg \
assets/quartz-alphabet.svg; do
[ -f "$DEST/$_req" ] || die "hub deploy incomplete: missing $_req"
done
chown -R nginx:nginx "$DEST" 2>/dev/null || true
log "deploy-ac-hub_ok $(host_short)"