# Use a lightweight Python image FROM python:3.11-slim # Set working directory WORKDIR /app # Install system dependencies (optional but safe) RUN apt-get update && apt-get install -y \ build-essential \ && rm -rf /var/lib/apt/lists/* # Copy requirements first (better Docker caching) COPY requirements.txt . # Install Python dependencies RUN pip install --no-cache-dir -r requirements.txt # Copy application code COPY app.py . # Expose the port Gunicorn will listen on EXPOSE 3001 # Run Gunicorn CMD ["gunicorn", "--bind", "0.0.0.0:3001", "app:app"]