mirror of
git://f0xx.org/ac/ac-deploy
synced 2026-07-29 04:38:48 +03:00
cluster0: lab seeds, Gitea mirrors, compose mail, verify tooling
Freeze lab-seeds backend for COMPOSE_SKIP_MONOLITH; fix Gitea mirror scripts for 1.25 API; add secrets.lab.env template, verify-mail-lab, LAB_PUBLIC_ORIGIN, and credentials pointers for mirror token recovery. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -7,7 +7,15 @@ ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
load_cluster_env
|
||||
|
||||
WS="${AC_WORKSPACE_ROOT:-/var/www/ac/workspace}"
|
||||
LEGACY="${APP_ROOT}/android_cast/examples/crash_reporter/backend"
|
||||
LAB_SEED="${ROOT}/lab-seeds/backend"
|
||||
MONOLITH_BACKEND="${APP_ROOT}/android_cast/examples/crash_reporter/backend"
|
||||
if [ -d "${LAB_SEED}/public" ]; then
|
||||
LEGACY="$LAB_SEED"
|
||||
elif [ "${COMPOSE_SKIP_MONOLITH:-0}" = "1" ]; then
|
||||
die "lab-seeds missing at ${LAB_SEED} and COMPOSE_SKIP_MONOLITH=1"
|
||||
else
|
||||
LEGACY="$MONOLITH_BACKEND"
|
||||
fi
|
||||
COMPOSED="${COMPOSE_BACKEND:-/var/www/ac/composed/backend}"
|
||||
PLATFORM_ROOT="${AC_PLATFORM_ROOT:-/var/www/ac/platform}"
|
||||
APP_PASS="$(read_cred mariadb_app password)"
|
||||
@@ -45,8 +53,8 @@ overlay_views() {
|
||||
}
|
||||
|
||||
if [ ! -f "${COMPOSED}/public/index.php" ] || [ "${FORCE_COMPOSE_SEED:-0}" = "1" ]; then
|
||||
[ -d "$LEGACY/public" ] || die "legacy backend missing at $LEGACY — run deploy-app.sh first"
|
||||
log "seed composed backend from legacy ${LEGACY}"
|
||||
[ -d "$LEGACY/public" ] || die "backend seed missing at $LEGACY (lab-seeds or deploy-app.sh monolith)"
|
||||
log "seed composed backend from ${LEGACY}"
|
||||
mkdir -p "$(dirname "$COMPOSED")"
|
||||
rm -rf "$COMPOSED"
|
||||
mkdir -p "$COMPOSED"
|
||||
@@ -93,6 +101,17 @@ overlay_views ac-be-remote-access
|
||||
overlay_views ac-be-access
|
||||
|
||||
ISSUES_BASE="${APP_BASE_PATH:-/app/androidcast_project/issues}"
|
||||
PUBLIC_ORIGIN_CFG="${LAB_PUBLIC_ORIGIN:-https://acl0.f0xx.org}"
|
||||
load_secrets_lab
|
||||
AUTH_KEY="${AUTH_ENCRYPTION_KEY:-lab-cluster-dev-32-char-min-secret!!}"
|
||||
MAIL_TRANSPORT="${MAIL_TRANSPORT:-smtp}"
|
||||
MAIL_FROM="${MAIL_FROM:-Android Cast Lab <noreply@acl0.f0xx.org>}"
|
||||
MAIL_REPLY="${MAIL_REPLY_TO:-info@apps.f0xx.org}"
|
||||
SMTP_HOST="${SMTP_HOST:-127.0.0.1}"
|
||||
SMTP_PORT="${SMTP_PORT:-587}"
|
||||
SMTP_ENC="${SMTP_ENCRYPTION:-tls}"
|
||||
SMTP_USER="${SMTP_USER:-}"
|
||||
SMTP_PASS="${SMTP_PASS:-}"
|
||||
mkdir -p "${COMPOSED}/config"
|
||||
log "write composed config.php base_path=${ISSUES_BASE}"
|
||||
cat > "${COMPOSED}/config/config.php" <<PHP
|
||||
@@ -100,6 +119,7 @@ cat > "${COMPOSED}/config/config.php" <<PHP
|
||||
return [
|
||||
'app_name' => 'Android Cast Issues',
|
||||
'base_path' => '${ISSUES_BASE}',
|
||||
'public_origin' => '${PUBLIC_ORIGIN_CFG}',
|
||||
'db' => [
|
||||
'driver' => 'mariadb',
|
||||
'sqlite_path' => __DIR__ . '/../data/crashes.sqlite',
|
||||
@@ -125,10 +145,22 @@ return [
|
||||
'require_wg_tools' => false,
|
||||
],
|
||||
'auth' => [
|
||||
'encryption_key' => 'lab-cluster-dev-32-char-min-secret!!',
|
||||
'encryption_key' => '${AUTH_KEY}',
|
||||
'max_attempts' => 8,
|
||||
'lockout_window_minutes' => 15,
|
||||
],
|
||||
'mail' => [
|
||||
'transport' => '${MAIL_TRANSPORT}',
|
||||
'from' => '${MAIL_FROM}',
|
||||
'reply_to' => '${MAIL_REPLY}',
|
||||
'smtp' => [
|
||||
'host' => '${SMTP_HOST}',
|
||||
'port' => ${SMTP_PORT},
|
||||
'encryption' => '${SMTP_ENC}',
|
||||
'username' => '${SMTP_USER}',
|
||||
'password' => '${SMTP_PASS}',
|
||||
],
|
||||
],
|
||||
'url_shortener' => [
|
||||
'enabled' => true,
|
||||
'public_base' => '${SHORT_LINKS_PUBLIC_BASE}',
|
||||
|
||||
Reference in New Issue
Block a user