FROM ghcr.io/astral-sh/uv:python3.11-bookworm-slim

WORKDIR /app

RUN apt-get update \
  && apt-get install -y --no-install-recommends zsh \
  && rm -rf /var/lib/apt/lists/*

COPY pyproject.toml uv.lock ./
COPY README.md ./
COPY src ./src
COPY config ./config
COPY ops ./ops

RUN uv sync --frozen --no-dev

ENV PATH="/app/.venv/bin:${PATH}"
ENV PYTHONUNBUFFERED=1
ENV UFORIA_DB_ENABLED=true
ENV UFORIA_DB_READ_MODE=db
ENV UFORIA_DB_WRITE_MODE=db

ENTRYPOINT ["uv", "run", "uforia"]
