forked from 0xWheatyz/SPARC
feat: update Docker config to run API and dashboard services
- Switch from Alpine to Debian slim for better package compatibility - Add system dependencies for pdfplumber and psycopg2 - Configure separate services for API (port 8000) and dashboard (port 8501) - Add automatic database initialization via init-db service - Update documentation with simplified Docker setup - Remove need for separate docker-compose.prod.yml 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
+15
-2
@@ -1,12 +1,25 @@
|
||||
FROM python:3.14-alpine3.23
|
||||
FROM python:3.12-slim
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Install system dependencies for pdfplumber and psycopg2
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
gcc \
|
||||
libpq-dev \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY requirements.txt .
|
||||
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
COPY . .
|
||||
|
||||
CMD ["python3", "main.py"]
|
||||
# Create patents directory for PDF storage
|
||||
RUN mkdir -p /app/patents
|
||||
|
||||
# Expose ports for API and Dashboard
|
||||
EXPOSE 8000 8501
|
||||
|
||||
# Default command runs the API (can be overridden in docker-compose)
|
||||
CMD ["uvicorn", "SPARC.api:app", "--host", "0.0.0.0", "--port", "8000"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user