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

fix(cluster0): Gitea cluster proxy, 2FA seed, hub downloads nginx

Bind Gitea on all interfaces for cast02/03 proxy, fix stale 2FA lab-seed
approve flow, add /v0/downloads/ and GITEA_UPSTREAM_HOST, and guard nginx
configure against empty templates.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Anton Afanasyeu
2026-07-10 15:36:49 +02:00
parent 970de79a90
commit a14413e886
6 changed files with 78 additions and 16 deletions

View File

@@ -10,8 +10,13 @@ ensure_shared_mounted
GIT_NGINX="/mnt/repos/ac/ac-deploy/sim/cluster0/nginx/apps-port80.conf"
CONF_DST="$ROOT/nginx/apps-port80.conf"
if [ -f "$GIT_NGINX" ] && [ "$(realpath "$GIT_NGINX" 2>/dev/null)" != "$(realpath "$CONF_DST" 2>/dev/null)" ]; then
install -D -m 644 "$GIT_NGINX" "$CONF_DST"
if [ -s "$GIT_NGINX" ]; then
install -D -m 644 "$GIT_NGINX" "$CONF_DST"
else
log "WARN: skip empty GIT_NGINX at $GIT_NGINX"
fi
fi
[ -s "$CONF_DST" ] || die "missing or empty nginx template at $CONF_DST"
install -D -m 644 "$CONF_DST" /etc/nginx/http.d/androidcast.conf
rm -f /etc/nginx/http.d/default.conf /etc/nginx/http.d/cluster.conf 2>/dev/null || true
nginx -t

View File

@@ -0,0 +1,25 @@
#!/bin/sh
# Publish hub download artifacts (Session Studio jar) to BE downloads mount.
# APK is served via OTA stable channel (/v0/ota/) — run ci-build-and-publish-ota.sh separately.
set -eu
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
# shellcheck source=/dev/null
. "$ROOT/scripts/lib/common.sh"
load_cluster_env
DOWNLOADS_ROOT="${APP_ROOT:-/var/www/localhost/htdocs/apps/app/androidcast_project}/downloads"
WS="${AC_WORKSPACE_ROOT:-/var/www/ac/workspace}"
STUDIO_JAR="${WS}/ac-session-studio/build/libs/ac-session-studio.jar"
mkdir -p "$DOWNLOADS_ROOT"
if [ -f "$STUDIO_JAR" ]; then
install -m 644 "$STUDIO_JAR" "${DOWNLOADS_ROOT}/ac-session-studio.jar"
log "installed Session Studio jar → ${DOWNLOADS_ROOT}/ac-session-studio.jar"
else
log "WARN: Session Studio jar not built at ${STUDIO_JAR}"
log " cd ac-session-studio && ./gradlew shadowJar (or installDist) on builder node"
fi
log "Hub downloads dir: ${DOWNLOADS_ROOT}"
log "URL: ${PUBLIC_ORIGIN:-https://apps.f0xx.org}/v0/downloads/ac-session-studio.jar"