Some checks failed
CI / lint-test (push) Successful in 1m16s
CI / skinny-install (api) (push) Successful in 26s
CI / skinny-install (bib) (push) Successful in 29s
CI / skinny-install (bcda) (push) Successful in 34s
CI / skinny-install (cms) (push) Successful in 30s
CI / skinny-install (conf) (push) Successful in 29s
CI / skinny-install (opps) (push) Successful in 30s
CI / skinny-install (perf) (push) Successful in 33s
CI / skinny-install (pfs) (push) Successful in 32s
Infra CI / notebooks (push) Successful in 6s
Infra CI / zotero (push) Successful in 6s
CI / skinny-install (aco) (push) Successful in 48s
CI / skinny-install (bls) (push) Successful in 29s
CI / skinny-install (ccw) (push) Successful in 31s
CI / skinny-install (cli) (push) Successful in 28s
CI / skinny-install (rex) (push) Successful in 24s
Infra CI / docs (push) Failing after 6s
Infra CI / api (push) Successful in 7s
Infra CI / mc (push) Successful in 7s
Deploy / build-scan-report (push) Failing after 1m26s
notebooks (10 GB) and zotero (18 GB) now use HEAVY_TAG instead of COMMIT_SHA so they are not rebuilt on every commit — this was saturating the network and killing connectivity during deploys. otel-collector: replace removed loki exporter with otlp_http/loki, fix deprecated otlp/otlphttp aliases, replace wget healthcheck with otelcol-contrib validate (scratch image has no shell). docs: healthcheck wget to 127.0.0.1 instead of localhost (alpine resolves localhost to ::1 but nginx binds IPv4 only). Loki: enable allow_structured_metadata for OTLP log ingestion. Generate STACK_API_SECRET in .env (was missing, caused compose warning). refs #285, refs #286, refs #287
56 lines
1.5 KiB
Docker
56 lines
1.5 KiB
Docker
# Stage 1: Extract docs from Python source + export bib library
|
|
FROM ghcr.io/astral-sh/uv:python3.13-bookworm-slim AS extract
|
|
|
|
WORKDIR /build
|
|
|
|
# Copy source code and extraction scripts
|
|
COPY src/ src/
|
|
COPY docs/scripts/ docs/scripts/
|
|
|
|
# Extract API docs via griffe (pure AST, no imports)
|
|
RUN uv run --with griffe python docs/scripts/extract_docs.py
|
|
|
|
# Export bibliography (gracefully handles missing bib.sqlite)
|
|
COPY data/bib.sqlit[e] data/
|
|
RUN uv run --with pydantic python docs/scripts/export_library.py
|
|
|
|
|
|
# Stage 2: Build Docusaurus static site
|
|
FROM node:22-slim AS build
|
|
|
|
RUN corepack enable && corepack prepare pnpm@10.12.1 --activate
|
|
|
|
WORKDIR /docs
|
|
|
|
# Install dependencies (pnpm for deterministic, fast installs)
|
|
COPY docs/package.json docs/pnpm-lock.yaml ./
|
|
RUN pnpm install --frozen-lockfile
|
|
|
|
# Copy Docusaurus config and source
|
|
COPY docs/docusaurus.config.js docs/sidebars.js docs/babel.config.js docs/tsconfig.json ./
|
|
COPY docs/src/ src/
|
|
COPY docs/static/ static/
|
|
COPY docs/docs/ docs/
|
|
|
|
# Copy generated API docs and library.json from extract stage
|
|
COPY --from=extract /build/docs/docs/api/ docs/api/
|
|
COPY docs/docs/api/index.md docs/api/index.md
|
|
COPY --from=extract /build/docs/static/library.json static/library.json
|
|
|
|
RUN pnpm build
|
|
|
|
|
|
# Stage 3: Serve with nginx
|
|
# hadolint ignore=DL3006
|
|
FROM nginx:alpine
|
|
|
|
RUN apk upgrade --no-cache
|
|
|
|
COPY --from=build /docs/build /usr/share/nginx/html
|
|
COPY docs/nginx.conf /etc/nginx/conf.d/default.conf
|
|
|
|
EXPOSE 80
|
|
|
|
HEALTHCHECK --interval=30s --timeout=5s --retries=3 \
|
|
CMD wget -qO /dev/null http://127.0.0.1:80/ || exit 1
|