ARG APP_VERSION=4.0.2

FROM python:3.12-slim
ARG APP_VERSION

WORKDIR /app
ENV APP_VERSION=${APP_VERSION}
ENV TZ=Pacific/Auckland
LABEL org.opencontainers.image.version="${APP_VERSION}"

COPY requirements.txt .
RUN apt-get update \
    && apt-get install -y --no-install-recommends tzdata \
    && rm -rf /var/lib/apt/lists/*
RUN pip install --no-cache-dir -r requirements.txt

COPY main.py .

CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
