# Runs this docs project's own `mdzero serve` in a container.
#
# Only the `mdzero` package is installed here -- this project's own
# docs/, public/, and mdzero.config.py are NOT baked into the image.
# docker-compose.yml bind-mounts this whole directory at /site instead,
# so editing content never requires a rebuild.
FROM python:3.12-slim

WORKDIR /site

RUN pip install --no-cache-dir mdzero

# The default HOST (127.0.0.1) only accepts connections from inside the
# container's own network namespace -- widened here so the port published
# by docker-compose.yml is actually reachable. Every other Config field
# (PORT, MCP_ENABLED, ...) can be overridden the same MDZERO_<FIELD> way,
# via this file's `environment:` section.
ENV MDZERO_HOST=0.0.0.0

EXPOSE 8000

CMD ["mdzero", "serve", "."]
