ARG BASE_TAG=latest FROM arca-base:${BASE_TAG} AS builder COPY services/mcp-docugen ./services/mcp-docugen RUN uv sync --frozen --no-dev --package mcp-docugen FROM python:3.11-slim AS runtime LABEL org.opencontainers.image.source="https://git.tielogic.xyz/Adriano/ArcaSuite" \ arca.service="mcp-docugen" WORKDIR /app COPY --from=builder /app /app ENV PATH="/app/.venv/bin:$PATH" RUN useradd -m -u 1000 app && \ mkdir -p /data && chown app:app /data USER app VOLUME ["/data"] ENV HOST=0.0.0.0 PORT=9100 DATA_DIR=/data EXPOSE 9100 HEALTHCHECK --interval=30s --timeout=5s --retries=3 --start-period=15s \ CMD python -c "import httpx, os; httpx.get(f'http://localhost:{os.environ.get(\"PORT\",\"9100\")}/health').raise_for_status()" CMD ["mcp-docugen"]