release: BUG fixes batch 1-6, full bug scan docs, Ubuntu/Linux dev

- Backend: auth refresh reuse, schedule/retry/sync/agent/files fixes
- Frontend: push WS, files ETag browse, vite build assets
- Docs: audit/changelog, production deploy gate, bug scan registry B7-77
- Deploy: deploy-production.sh, prune assets, gate logs
This commit is contained in:
Nexus Deploy
2026-06-04 14:01:14 +08:00
parent 9ac6a2d27f
commit a2ae74d582
367 changed files with 77336 additions and 751 deletions
+58
View File
@@ -0,0 +1,58 @@
#!/usr/bin/env bash
# Start Nexus local dev: Docker (mysql+redis) + uvicorn + optional Vite
set -euo pipefail
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
cd "${ROOT}"
if ! command -v docker >/dev/null; then
echo "Install docker.io first" >&2
exit 1
fi
if [ ! -f .env ]; then
python3 docker/generate_env.py
python3 docker/sync_root_env.py
fi
echo "Starting MySQL + Redis..."
docker compose up -d mysql redis
echo "Waiting for MySQL..."
for _ in $(seq 1 40); do
st=$(docker inspect -f '{{.State.Health.Status}}' nexus-mysql-1 2>/dev/null || echo starting)
[ "${st}" = "healthy" ] && break
sleep 2
done
if [ ! -d .venv ]; then
python3 -m venv .venv
.venv/bin/pip install -r requirements.txt -r requirements-dev.txt
fi
if ! .venv/bin/python -c "
import asyncio
from sqlalchemy import text
from server.infrastructure.database.session import AsyncSessionLocal
async def c():
async with AsyncSessionLocal() as s:
n=(await s.execute(text('SELECT COUNT(*) FROM admins'))).scalar()
print(n)
asyncio.run(c())
" 2>/dev/null | grep -q '^[1-9]'; then
echo "No admin — run: NEXUS_TEST_ADMIN_PASSWORD='your-pass' python3 scripts/seed_local_admin.py"
fi
if ! ss -tlnp 2>/dev/null | grep -q ':8600'; then
echo "Starting API on :8600..."
nohup .venv/bin/uvicorn server.main:app --host 0.0.0.0 --port 8600 --reload \
> /tmp/nexus-uvicorn.log 2>&1 &
sleep 2
fi
echo ""
echo "API: http://127.0.0.1:8600/app/"
echo "Health: curl http://127.0.0.1:8600/health"
echo ""
echo "Frontend dev (optional): cd frontend && npm run dev → http://localhost:3000/app/"
echo "Logs: tail -f /tmp/nexus-uvicorn.log"