cfe26a07a7
Multi-stage Dockerfile: yfm build (Node 20 alpine) → nginx 1.27 alpine
serving static HTML. Nginx config:
- /healthz endpoint для k8s probes
- /docs/ alias → /usr/share/nginx/html/ (Diplodoc делает relative links,
alias корректно работает без URL rewriting)
- Hash-named assets (_bundle/) — cache 1y immutable
- HTML pages — cache 5min must-revalidate
- /docs (без trailing slash) → 301 → /docs/
- Security headers (X-Content-Type-Options, X-Frame-Options, Referrer-Policy)
CI:
- build-docs (sanity check) — теперь только на non-main branches и MR
(для preview без push). Production build идёт через docker-docs.
- docker-docs (NEW) — multi-stage Dockerfile build + push в repo.nstart.cloud
через standard .docker_base + .publish_script pattern. Path-filtered на
docs/**, manual через web UI.
- resolve-tag: emit RESOLVED_DOCS_TAG (= IMAGE_TAG, тот же что для backend).
- trigger-deploy-{staging,prod}: pass DOCS_IMAGE_TAG в downstream pipeline.
Local verify:
cd docs && docker build -t ordinis-docs:test .
docker run --rm -p 18088:8080 ordinis-docs:test
curl localhost:18088/healthz → 200
curl -I localhost:18088/docs → 301 → /docs/
curl localhost:18088/docs/ → 200 index.html
curl localhost:18088/docs/integration/api/auth.html → 200
curl localhost:18088/docs/missing.html → 404
Соответствующие infra-side изменения (Helm chart docs deployment + Ingress
path /docs/, values, deploy script) — commit в ordinis-infra repo.
Ordinis Integrator Guide (Diplodoc / YFM)
Consumer-facing документация Ordinis НСИ ЦУОД. Build через Diplodoc (open-source documentation platform от Yandex), source — YFM (Yandex Flavored Markdown).
Scope: только то, что нужно интеграторам (Альтум team, BI, third-party
consumers). Operator runbooks, архитектурные deep-dives и project state —
во внутренней документации в ../docs-internal/,
не в Diplodoc build.
Структура
docs/
├── package.json # @diplodoc/cli + build scripts
├── .yfm # Diplodoc config
├── toc.yaml # Содержание / sidebar
├── index.md # Главная (integrator-focused tabs)
└── integration/
├── api/ # 11 глав про API integration
│ ├── index.md
│ ├── auth.md
│ ├── read-endpoints.md
│ ├── events.md
│ ├── webhooks.md
│ ├── bitemporal.md
│ ├── x-references.md
│ ├── caching.md
│ ├── errors.md
│ ├── best-practices.md
│ └── bundle-cuod.md
└── altum-imaging-order.md
Внутренние материалы (НЕ в Diplodoc build):
docs-internal/
├── ops/ # Operator runbook (on-call)
├── status/ # Project state snapshots
└── tech/ # Legacy technical pages
Сборка
Требуется Node 18+.
cd docs
pnpm install
pnpm build # → ./_dist (HTML)
pnpm serve # → http://localhost:8088
pnpm dev # build + serve одной командой
Build output (_dist/) — статический HTML, deployable в:
- GitLab Pages
- S3 / object storage
- nginx/ingress на k8s cluster
Editorial guidelines
Этот set документации — public contract для интеграторов:
- Не leak'аем internal architecture — никаких internal alert names, service paths, internal infrastructure URLs.
- API contract стабилен — изменения требуют semver bump + announcement.
- Consumer-side examples для каждой концепции (Python, Node, либо Spring).
- Версионирование через bundle / API major.
Для operator-side / dev-side материалов — docs-internal/ либо design docs
в ~/.gstack/projects/claude/.
YFM extensions используются
{% list tabs %}— табы для switching между audiences{% note info|warning|tip %}— выделенные блокиmermaidcode blocks — диаграммы (graph LR, gantt)toc.yamlcross-links — sidebar navigation
Roadmap
- Базовая структура integration guide (11 страниц)
- CI job
build-docsв.gitlab-ci.yml - GitLab Pages / k8s ingress deployment
- Search plugin
- EN translation (через
langs:в.yfm) - Includes для shared snippets (auth examples, error tables)
- Versioning — separate doc trees per API major version