FROM python:3.13-slim # Set working directory WORKDIR /app # Install system dependencies RUN apt-get update && apt-get install -y \ build-essential \ && rm -rf /var/lib/apt/lists/* # Copy requirements first for better caching COPY requirements.txt requirements-dev.txt ./ # Install Python dependencies (the project is run only in Docker, so dev tools # like pytest and mypy are part of the image) RUN pip install --no-cache-dir -r requirements-dev.txt # Copy application code COPY pyproject.toml alembic.ini ./ COPY ./app ./app COPY ./migrations ./migrations COPY ./data ./data COPY ./tests ./tests # Set Python path ENV PYTHONPATH=/app # Expose port EXPOSE 8000 # Command will be overridden by docker-compose CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]