FROM python:3.14.3-alpine

WORKDIR /app

# Install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Install ffmpeg for HLS handling
RUN apk add --no-cache ffmpeg nodejs

# Copy application
COPY . .

EXPOSE 5000

# Use production WSGI server
CMD ["gunicorn", "-w", "1", "-b", "0.0.0.0:5000", "--timeout", "60", "--access-logfile", "-", "--error-logfile", "-", "--log-level", "info", "app:app"]
