Load Postgres from JSON-lines export; drop native better-sqlite3
Deploy / deploy (push) Successful in 6m1s
Deploy / deploy (push) Successful in 6m1s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FbMbJPadPzVwvt9rU9GBNo
This commit is contained in:
+3
-2
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
# Permanent deploy on the ces-control host, fully driven by CI:
|
||||
# 1. install + provision PostgreSQL (apt, systemd; role/db created once, password generated once)
|
||||
# 2. fetch raw sources (cached), build the staging SQLite with the Python scripts
|
||||
# 2. fetch raw sources (cached), build a staging SQLite with the Python scripts, export it to JSON lines
|
||||
# 3. build the site, load the data into Postgres (schema "next" -> swapped in as "live")
|
||||
# 4. switch /opt/llm-survey/current, (re)start systemd unit `llm-survey`, health-check
|
||||
# Port is never 3000 or 18131 (taken).
|
||||
@@ -64,11 +64,12 @@ ln -sfn "$ROOT/cache/raw" data/raw # raw downloads survive
|
||||
bash scripts/fetch_data.sh
|
||||
python3 scripts/ingest.py --raw data/raw --out build/papers.db
|
||||
python3 scripts/build_worktypes.py --db build/papers.db
|
||||
python3 scripts/export_jsonl.py --db build/papers.db --out build/export
|
||||
|
||||
# ---- 3. site build + load into Postgres ----------------------------------------------
|
||||
npm ci --no-audit --no-fund
|
||||
npm run build
|
||||
node scripts/load-pg.js --sqlite build/papers.db
|
||||
node scripts/load-pg.js --dir build/export
|
||||
rm -rf build
|
||||
|
||||
# ---- 4. switch + restart --------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user