Add server-side /api/rescan upload pipeline and Home UI.
Accept ZIP/single help files, process with help_processor into OUTPUT_DIR+Postgres, pollable jobs, optional RESCAN_TOKEN. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
38
COOLIFY.md
38
COOLIFY.md
@@ -8,30 +8,44 @@
|
||||
| Base Directory | `/` |
|
||||
| Dockerfile Location | `/Dockerfile` |
|
||||
|
||||
Dockerfile се редактира **само в git** (няма Edit Dockerfile след Add Resource).
|
||||
Dockerfile се редактира **само в git**.
|
||||
|
||||
## Environment Variables
|
||||
|
||||
```
|
||||
HELP_DB_CONN=host=... port=5432 dbname=rip_help_system user=... password=...
|
||||
OUTPUT_DIR=/mnt/mssql/share/RIP/RIP_Help_Source/Output
|
||||
HOME_IMAGE=/mnt/mssql/share/RIP/RIP_Help_Source/Output/Bairaci.png
|
||||
HELP_REMOTE_ROOT=/mnt/mssql/share/RIP/RIP_Help_Source/Output
|
||||
HOME_IMAGE=/app/Bairaci.png
|
||||
ANTHROPIC_API_KEY=sk-ant-...
|
||||
RESCAN_TOKEN=избери-тайна # опционално, но препоръчително
|
||||
```
|
||||
|
||||
## Persistent Storage
|
||||
## Persistent Storage (read-write!)
|
||||
|
||||
| Host path | Container path | Mode |
|
||||
|-----------|----------------|------|
|
||||
| `/mnt/mssql/share/RIP/RIP_Help_Source/Output` | `/mnt/mssql/share/RIP/RIP_Help_Source/Output` | read-only OK |
|
||||
| Host path | Container path |
|
||||
|-----------|----------------|
|
||||
| `/mnt/mssql/share/RIP/RIP_Help_Source/Output` | `/mnt/mssql/share/RIP/RIP_Help_Source/Output` |
|
||||
|
||||
(Файловете се качват с WinSCP в този host path.)
|
||||
Volume-ът трябва да е **writable** — rescan пише `.txt` + `images/`.
|
||||
|
||||
## Проверки след Redeploy
|
||||
## API rescan
|
||||
|
||||
1. `/healthz` → `status/db ok`, `output_dir_ok: true`, `txt_count` > 0
|
||||
2. `/api/sections?prefix=RIP` → `text` не е празен
|
||||
3. `/api/search?q=поръчки&prefix=RIP`
|
||||
4. `/?prefix=RIP` — dashboard/viewer
|
||||
- `POST /api/rescan` — multipart `file` (+ `prefix`, `force`)
|
||||
- `GET /api/rescan/{job_id}` — статус
|
||||
- UI: Home таб → Rescan
|
||||
|
||||
Ако `RESCAN_TOKEN` е зададен:
|
||||
```
|
||||
localStorage.setItem('RESCAN_TOKEN', 'тайната')
|
||||
```
|
||||
в конзолата на браузъра (веднъж), или header `X-Rescan-Token`.
|
||||
|
||||
## Проверки
|
||||
|
||||
1. `/healthz` → `output_dir_ok: true`
|
||||
2. `/?prefix=RIP` — Home + Rescan
|
||||
3. `/api/search?q=...&prefix=RIP`
|
||||
|
||||
## Порт
|
||||
|
||||
|
||||
Reference in New Issue
Block a user