- Add persistent Docker volume for file storage to fix 404 download errors - Set FILE_STORAGE_PATH env var in Dockerfile and docker-compose.yml - Increase thumbnail generation limit from 500KB to 10MB for images - Remove encodeURIComponent from file download URL to prevent path encoding Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
36 lines
857 B
Docker
Executable file
36 lines
857 B
Docker
Executable file
FROM python:3.12-slim
|
|
|
|
WORKDIR /app
|
|
|
|
ENV PYTHONDONTWRITEBYTECODE=1
|
|
ENV PYTHONUNBUFFERED=1
|
|
|
|
# Install curl for healthcheck
|
|
RUN apt-get update && apt-get install -y --no-install-recommends curl \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Copy requirements first for layer caching
|
|
COPY backend/requirements.txt .
|
|
|
|
# Install dependencies
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Copy application code
|
|
COPY backend/app/ ./app/
|
|
|
|
# Copy alembic configuration for migrations
|
|
COPY backend/alembic.ini .
|
|
COPY backend/alembic/ ./alembic/
|
|
|
|
# Copy reference docs into the image
|
|
COPY reference_docs/ ./reference_docs/
|
|
|
|
# Set reference docs path for container
|
|
ENV REFERENCE_DOCS_PATH=/app/reference_docs
|
|
|
|
# Set file storage path for container
|
|
ENV FILE_STORAGE_PATH=/app/storage
|
|
|
|
EXPOSE 8000
|
|
|
|
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
|