mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-25 00:36:31 +02:00
feat: Added Docker Support and missing dependencies.
This commit is contained in:
parent
c5287829b6
commit
709aa6f303
9 changed files with 1004 additions and 24 deletions
32
surfsense_backend/Dockerfile
Normal file
32
surfsense_backend/Dockerfile
Normal 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"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue