FROM python:3.12-slim

WORKDIR /app
COPY . .

RUN pip install --no-cache-dir . "uvicorn[standard]>=0.30"

# Core's Deployments view can only ever show the SDK version baked into
# this image (self-reported automatically) unless THIS image's own
# release version rides along too -- there is nothing installed here that
# reliably carries it (a pyproject.toml version is easy to leave stale
# across image releases). docker-publish.yml passes this at build time
# from the same value it tags the image with, so it's never a second
# number to remember to bump.
ARG EXTENSION_VERSION=dev
ENV SUGARAI_EXTENSION_VERSION=$EXTENSION_VERSION

EXPOSE 8080
CMD ["uvicorn", "{module}.app:app.asgi", "--host", "0.0.0.0", "--port", "8080"]
