- Updated docker-compose.yml to allow disabling embedded Ollama via environment variable. - Refactored Dockerfile and Dockerfile.dev for improved dependency management and installation process. - Enhanced FastAPI migration scripts to handle orphaned Alembic revisions and added new database migration logic. - Improved error handling in background tasks and Codex authentication endpoints. - Added support for font file uploads with better validation and extraction of font names. - Introduced new image search functionality with support for Pexels and Pixabay APIs.
41 lines
1.5 KiB
Text
41 lines
1.5 KiB
Text
# syntax=docker/dockerfile:1.4
|
|
FROM python:3.11-slim-bookworm
|
|
|
|
WORKDIR /app
|
|
|
|
# Docling is in pyproject.toml; uv.lock pins torch to this index (same as former:
|
|
# pip install docling --extra-index-url https://download.pytorch.org/whl/cpu
|
|
# UV_EXTRA_INDEX_URL keeps CPU wheels available if the lock is refreshed in Docker.)
|
|
ENV APP_DATA_DIRECTORY=/app_data \
|
|
TEMP_DIRECTORY=/tmp/presenton \
|
|
PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium \
|
|
UV_SYSTEM_PYTHON=1 \
|
|
UV_COMPILE_BYTECODE=1 \
|
|
UV_LINK_MODE=copy \
|
|
UV_EXTRA_INDEX_URL=https://download.pytorch.org/whl/cpu \
|
|
PATH="/root/.local/bin:${PATH}"
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
ca-certificates curl \
|
|
nginx libreoffice fontconfig chromium imagemagick zstd \
|
|
&& curl -LsSf https://astral.sh/uv/install.sh | sh \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
|
|
&& apt-get install -y nodejs \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Bind mount `.:/app` hides any .venv under servers/fastapi at runtime — install deps into
|
|
# system site-packages (same interpreter `start.js` uses as `python`).
|
|
COPY servers/fastapi /app/servers/fastapi
|
|
WORKDIR /app/servers/fastapi
|
|
RUN --mount=type=cache,target=/root/.cache/uv \
|
|
uv export --frozen --no-dev --no-emit-project -o /tmp/requirements.txt \
|
|
&& uv pip install --system -r /tmp/requirements.txt \
|
|
&& uv pip install --system --no-deps .
|
|
|
|
WORKDIR /app
|
|
COPY nginx.conf /etc/nginx/nginx.conf
|
|
|
|
EXPOSE 80
|
|
CMD ["node", "/app/start.js", "--dev"]
|