666ghj

Add initial Docker configuration.

  1 +.git
  2 +.gitmodules
  3 +.vscode
  4 +.cursor
  5 +__pycache__
  6 +*.py[cod]
  7 +*.pyo
  8 +*.pyd
  9 +*.log
  10 +*.sqlite3
  11 +.DS_Store
  12 +Thumbs.db
  1 +FROM python:3.11-slim
  2 +
  3 +# Prevent Python from writing .pyc files and buffer stdout/stderr
  4 +ENV PYTHONDONTWRITEBYTECODE=1 \
  5 + PYTHONUNBUFFERED=1 \
  6 + PIP_NO_CACHE_DIR=1
  7 +
  8 +# Install system dependencies required by scientific Python stack, Playwright, and Streamlit
  9 +RUN apt-get update && apt-get install -y --no-install-recommends \
  10 + build-essential \
  11 + curl \
  12 + git \
  13 + libgl1 \
  14 + libglib2.0-0 \
  15 + libgtk-3-0 \
  16 + libpango-1.0-0 \
  17 + libpangocairo-1.0-0 \
  18 + libatk1.0-0 \
  19 + libatk-bridge2.0-0 \
  20 + libxcb1 \
  21 + libxcomposite1 \
  22 + libxdamage1 \
  23 + libxext6 \
  24 + libxfixes3 \
  25 + libxi6 \
  26 + libxtst6 \
  27 + libnss3 \
  28 + libxrandr2 \
  29 + libxkbcommon0 \
  30 + libasound2 \
  31 + libx11-xcb1 \
  32 + libxshmfence1 \
  33 + libgbm1 \
  34 + ffmpeg \
  35 + && apt-get clean && rm -rf /var/lib/apt/lists/*
  36 +
  37 +WORKDIR /app
  38 +
  39 +# Install Python dependencies first to leverage Docker layer caching
  40 +COPY requirements.txt ./
  41 +RUN pip install --upgrade pip && \
  42 + pip install -r requirements.txt && \
  43 + python -m playwright install chromium
  44 +
  45 +# Copy application source
  46 +COPY . .
  47 +
  48 +# Ensure runtime directories exist even if ignored in build context
  49 +RUN mkdir -p logs final_reports insight_engine_streamlit_reports media_engine_streamlit_reports query_engine_streamlit_reports
  50 +
  51 +# Expose Flask and Streamlit ports
  52 +EXPOSE 5000 8501 8502 8503
  53 +
  54 +# Default command launches the Flask orchestrator which starts Streamlit agents
  55 +CMD ["python", "app.py"]
  1 +version: "3.9"
  2 +
  3 +services:
  4 + bettafish:
  5 + build:
  6 + context: .
  7 + dockerfile: Dockerfile
  8 + image: bettafish:latest
  9 + container_name: bettafish
  10 + restart: unless-stopped
  11 + environment:
  12 + - PYTHONUNBUFFERED=1
  13 + ports:
  14 + - "5000:5000"
  15 + - "8501:8501"
  16 + - "8502:8502"
  17 + - "8503:8503"
  18 + volumes:
  19 + - ./logs:/app/logs
  20 + - ./final_reports:/app/final_reports
  21 + - ./insight_engine_streamlit_reports:/app/insight_engine_streamlit_reports
  22 + - ./media_engine_streamlit_reports:/app/media_engine_streamlit_reports
  23 + - ./query_engine_streamlit_reports:/app/query_engine_streamlit_reports