# Use Python 3.11 slim image (matches project requirements) FROM python:3.11-slim # Set working directory to app root WORKDIR /app # Install system dependencies # gcc: for compiling some python packages if needed # ffmpeg: for pydub (audio processing) # curl, libpq-dev: for postgres/healthchecks RUN apt-get update && apt-get install -y \ gcc \ ffmpeg \ libpq-dev \ curl \ && rm -rf /var/lib/apt/lists/* # Copy backend requirements first for caching COPY backend/requirements.txt ./backend/requirements.txt # Install Python dependencies RUN pip install --no-cache-dir -r backend/requirements.txt # Copy the entire backend directory COPY backend ./backend # Set working directory to backend where app code lives WORKDIR /app/backend # Set environment variables ENV PYTHONUNBUFFERED=1 # Set permissions and run CMD ["python", "start.py"]