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>
53 lines
1.4 KiB
Markdown
53 lines
1.4 KiB
Markdown
# 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`
|