# Dockerfile # TranscriptIQ FastAPI backend # Used for both the app service and the celery worker service FROM python:3.11-slim WORKDIR /app # Install system dependencies for pdfplumber, docx, etc. RUN apt-get update && apt-get install -y \ gcc \ libpq-dev \ libmagic1 \ poppler-utils \ antiword \ && rm -rf /var/lib/apt/lists/* # Install Python dependencies first (layer caching) COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy application code COPY app/ ./app/ COPY migrations/ ./migrations/ # Create upload directory RUN mkdir -p /data/uploads # Non-root user for security RUN useradd -m -u 1000 transcriptiq && chown -R transcriptiq:transcriptiq /app /data USER transcriptiq EXPOSE 8000