chore: default pipeline includes Glassdoor; document DB copy and cron sources

- Add glassdoor to DEFAULT_CONFIG so POST /api/pipeline/run with {} runs JobSpy trio.
- jobber-pipeline-telegram.sh: optional JOBBER_PIPELINE_SOURCES for explicit source list.
- Deploy doc: WAL checkpoint + rsync jobs.db to VM for profiles/settings/jobs.

Made-with: Cursor
This commit is contained in:
2026-04-05 19:49:01 -04:00
parent fea00ae656
commit 09ab32e1e8
4 changed files with 37 additions and 3 deletions
+22
View File
@@ -192,6 +192,28 @@ docker compose up -d --build
Wait until `curl -sf http://127.0.0.1:3005/health` succeeds before relying on cron (container needs a few seconds after start).
**5b. Copy your local SQLite to the VM (profiles, settings, jobs)** — optional; use when you want the same **search profile**, `activeProfileId`, and job rows as on your laptop.
1. **Stop** the app that holds the DB open: local `npm run dev` (Ctrl+C) and on the VM `docker compose stop` (or `docker stop job-ops`).
2. **Checkpoint WAL** on the machine that owns the canonical DB (usually your laptop), so a copy is self-contained:
```bash
cd /path/to/Jobber
sqlite3 data/jobs.db "PRAGMA wal_checkpoint(FULL);"
```
3. **Copy** `data/jobs.db` to the VM repo’s `./data/` (same path Docker mounts). Example from your Mac:
```bash
rsync -avz --progress ./data/jobs.db YOUR_USER@178:/opt/Jobber/data/jobs.db
```
If you use WAL files and skip checkpointing, copy `jobs.db`, `jobs.db-wal`, and `jobs.db-shm` together while **nothing** is writing to the DB.
4. On the VM: `docker compose up -d` and verify `GET /api/settings` / the Settings UI shows your profile.
**Default pipeline sources** (empty JSON body to `POST /api/pipeline/run`, e.g. cron script) include **Glassdoor** via JobSpy with Indeed and LinkedIn. Glassdoor’s API often returns errors in logs; LinkedIn/Indeed can still produce rows. To force an explicit list from cron, set `JOBBER_PIPELINE_SOURCES` in `/root/.jobber-cron.env` (see `scripts/jobber-cron.env.example`).
**Security:** Never commit `/root/.jobber-cron.env` or paste bot tokens in Git. Revoke the token in BotFather if it was exposed.
### Option B2 — Minimal curl-only (no wait-for-finish)