feat: revamp analytics dashboards and harden database migrations

Add dashboard and overview analytics, health monitoring, provider expense tracking, and announcement updates across the gateway and frontend.

Keep schema migrations free of historical backfills while preserving automatic backfill execution. Bound migration deadlines, run schema preparation before Compose replacement, and anonymize deleted dashboard users.

Include the current documentation cleanup and regression coverage.
This commit is contained in:
elky
2026-10-01 11:48:17 +08:00
parent 60b89cc840
commit 066ea87d72
327 changed files with 31728 additions and 20645 deletions
+14 -2
View File
@@ -1,8 +1,8 @@
#!/usr/bin/env bash
# One-click updater for Docker Compose deployments.
#
# This updates the app container image and recreates only the app service. It is
# intentionally not a hot patch of the running Rust process.
# This applies schema migrations with the new image before recreating the app
# service. It is intentionally not a hot patch of the running Rust process.
set -euo pipefail
@@ -220,6 +220,14 @@ compose_pull_app() {
compose pull "${APP_SERVICE}"
}
compose_migrate_app() {
# The image entrypoint is aether-gateway; pass only its migration flag.
# A one-off container uses the new image and existing service environment,
# without publishing app ports, restarting dependencies, or replacing app.
# --migrate applies schema changes only; app startup runs pending backfills.
compose run --rm --no-deps -T "${APP_SERVICE}" --migrate
}
compose_up_app() {
local wait_for_health="${1:-false}"
local -a up_args=(up -d)
@@ -280,6 +288,10 @@ if [[ "${NO_PULL}" != "true" ]]; then
compose_pull_app
fi
echo ">>> Applying schema migrations before replacing ${APP_SERVICE}..."
compose_migrate_app \
|| die "database migration failed; app was not recreated; no running service was stopped"
echo ">>> Recreating ${APP_SERVICE}..."
if compose_supports_wait; then
compose_up_app true \