FROM python:3.12-slim

WORKDIR /app
COPY pyproject.toml uv.lock README.md ./
COPY src ./src

RUN pip install --no-cache-dir uv \
    && uv pip install --system "agentenna[station] @ ."

ENV AGENTENNA_DB_PATH=/data/agentenna.db
EXPOSE 1234

# The Station reads AGENTENNA_STATION_TOKEN itself. Set it to require auth
# (the container binds 0.0.0.0, so an unset token refuses to start unless you
# pass --allow-unauth). Do not hardcode a token in the image.
CMD ["sh", "-c", "agentenna serve --db ${AGENTENNA_DB_PATH} --host 0.0.0.0 --port 1234"]
