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:
17
Dockerfile
17
Dockerfile
@@ -1,20 +1,27 @@
|
||||
# Slim Python image; psycopg2-binary включва свои libs, не е нужен build deps
|
||||
# Python 3.12 — webapp + server-side rescan (help_processor)
|
||||
FROM python:3.12-slim
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Сваляме само файловете нужни за webapp-а (не и Windows-only deps)
|
||||
# Затова инсталираме отделен webapp-requirements без pywin32 / pdfplumber / docx
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
libxml2 \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY requirements-webapp.txt /app/
|
||||
RUN pip install --no-cache-dir -r requirements-webapp.txt
|
||||
|
||||
# Кода + home image в образа (fallback ако липсва в share)
|
||||
COPY webapp /app/webapp
|
||||
COPY help_processor.py /app/help_processor.py
|
||||
COPY Bairaci.png /app/Bairaci.png
|
||||
|
||||
# Секции/картинки — Coolify Persistent Storage mount
|
||||
ENV OUTPUT_DIR=/mnt/mssql/share/RIP/RIP_Help_Source/Output
|
||||
ENV HOME_IMAGE=/app/Bairaci.png
|
||||
ENV HELP_REMOTE_ROOT=/mnt/mssql/share/RIP/RIP_Help_Source/Output
|
||||
# Set in Coolify (required for /api/rescan):
|
||||
# ANTHROPIC_API_KEY=...
|
||||
# HELP_DB_CONN=...
|
||||
# Optional:
|
||||
# RESCAN_TOKEN=secret → require header X-Rescan-Token
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
|
||||
Reference in New Issue
Block a user