Files
rip-help-system/COOLIFY.md
sabo 46a2f2272b 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>
2026-08-26 09:20:45 +03:00

53 lines
1.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Coolify — RIP Help System
## Build (Configuration → General)
| Поле | Стойност |
|------|----------|
| Build Pack | Dockerfile |
| Base Directory | `/` |
| Dockerfile Location | `/Dockerfile` |
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
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 (read-write!)
| Host path | Container path |
|-----------|----------------|
| `/mnt/mssql/share/RIP/RIP_Help_Source/Output` | `/mnt/mssql/share/RIP/RIP_Help_Source/Output` |
Volume-ът трябва да е **writable** — rescan пише `.txt` + `images/`.
## API rescan
- `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`
## Порт
`8000`