FROM python:3.14-alpine

WORKDIR /usr/src/nortrom
COPY pyproject.toml .
COPY uv.lock .

COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
ENV UV_FROZEN=1
ENV UV_NO_DEV=1
ENV UV_NO_INSTALL_PROJECT=1
RUN uv sync

COPY . .
ENV UV_NO_INSTALL_PROJECT=0
RUN uv sync

ENV UV_NO_SYNC=1
ENV PYTHONUNBUFFERED=1

ENTRYPOINT ["uv", "run", "python", "-OO", "-m", "nortrom"]
CMD []

LABEL org.opencontainers.image.title="Nortrom"
LABEL org.opencontainers.image.description="Discord bot to mute or deafen entire channels at once"
LABEL org.opencontainers.image.authors="Stefano Pigozzi <me@steffo.eu>"
LABEL org.opencontainers.image.version="2.0.0"
LABEL org.opencontainers.image.licenses="EUPL-1.2"
LABEL org.opencontainers.image.url="https://g.starshard.space/steffo/-/packages/container/nortrom/latest"
LABEL org.opencontainers.image.source="https://g.starshard.space/steffo/nortrom"
