FROM python:3.11-slim WORKDIR /app # Install dependencies COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy all backend files COPY . . # Create required dirs RUN mkdir -p database databases uploads backup logs # Copy default DB if present (included in repo) # If not present, users can upload via the UI EXPOSE 7860 ENV FLASK_ENV=production ENV PORT=7860 CMD ["gunicorn", "--bind", "0.0.0.0:7860", "--workers", "1", "--timeout", "120", "app:app"]