feat: Added Docker Support and missing dependencies.

This commit is contained in:
DESKTOP-RTLN3BA\$punk 2025-03-20 18:52:06 -07:00
parent c5287829b6
commit 709aa6f303
9 changed files with 1004 additions and 24 deletions

View file

@ -0,0 +1,32 @@
FROM python:3.12-slim
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc \
python3-dev \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements
COPY pyproject.toml .
COPY uv.lock .
# Install python dependencies
RUN pip install --no-cache-dir uv && \
uv pip install --system --no-cache-dir -e .
# Install Playwright browsers for web scraping if needed
RUN pip install playwright && \
playwright install --with-deps chromium
# Copy source code
COPY . .
# Prevent uvloop compatibility issues
ENV PYTHONPATH=/app
ENV UVICORN_LOOP=asyncio
# Run
EXPOSE 8000
CMD ["python", "main.py"]