FROM python:3.8-slim

ENV HIKKA_DATA_DIR=/data
ENV DOCKER=true
ENV PYTHONUNBUFFERED=1
ENV GIT_PYTHON_REFRESH=quiet
ENV UV_LINK_MODE=copy
ENV UV_COMPILE_BYTECODE=1
ENV UV_PYTHON_CACHE_DIR=/root/.cache/uv/python
ENV UV_SYSTEM_PYTHON=1

RUN --mount=from=ghcr.io/astral-sh/uv,source=/uv,target=/bin/uv \
    --mount=type=cache,target=/root/.cache/uv \
    --mount=type=bind,target=/build,ro \
    uv pip install /build

EXPOSE 8080

CMD [ "hikka" ]