FROM python:3.13-slim

WORKDIR /app

COPY pyproject.toml ./
COPY src ./src
# slim by design: STT/TTS models live in the Speaches container, not this image.
# For the embedded fallback backend build with ".[speech]" instead.
RUN pip install --no-cache-dir .

EXPOSE 8600
# generous ws ping timeout: the device stays quiet during 10-25s Tatlock turns
CMD ["uvicorn", "desklock_gateway.main:app", "--host", "0.0.0.0", "--port", "8600", "--ws-ping-interval", "25", "--ws-ping-timeout", "120"]
