acupedia-api/app/bootstrap/README.md

2.4 KiB

AccuPedia Bootstrap Orchestration CLI — Full Legacy-Compatible Surface

This CLI is now the canonical public entry point for:

auth
content
media
commerce
validate
all

The content and media commands preserve the legacy option surface while running against the four-schema architecture.

Content

Equivalent to the legacy content CLI:

python -m bootstrap content   --config ./config.json   --modules-root ./modules

Fine-grained examples:

python -m bootstrap content   --config ./config.json   --modules-root ./modules   --module-code M0001
python -m bootstrap content   --config ./config.json   --modules-root ./modules   --module-code M0001   --template-code M0001_CT0003
python -m bootstrap content   --config ./config.json   --modules-root ./modules   --module-code M0001   --template-code M0001_CT0003   --content-code LU-1

Supported content options:

--config
--modules-root
--module-code                  repeatable
--template-code                repeatable
--content-code                 repeatable
--seed-search-facets-only
--seed-search-facet-only       retained alias
--skip-search-facets
--publish-content
--continue-on-error
--created-by

Legacy validation rules are preserved exactly.

The old --schema option is deliberately not exposed. Four-schema production ownership is fixed and content seeders own the content schema.

Media

Equivalent to the legacy media CLI:

python -m bootstrap media   --manifest ./media.json   --media-root ./images

Supported options:

--manifest
--media-root
--validate-only
--dry-run
--force-reupload

The original MinIO environment contract is preserved:

MINIO_ENDPOINT
MINIO_ACCESS_KEY
MINIO_SECRET_KEY
MINIO_BUCKET
MINIO_SECURE

Media exit semantics are preserved:

0 = success
2 = media report not OK

Global options

--database-url
--log-level

--database-url defaults to DATABASE_URL.

Full bootstrap

The all command uses explicit prefixes to prevent ambiguity:

python -m bootstrap all   --content-config ./config.json   --content-modules-root ./modules   --media-manifest ./media.json   --media-media-root ./images

Content selectors under all use --content-*; media controls use --media-*.

Execution order:

auth
  ↓
content
  ↓
media
  ↓
commerce
  ↓
validate

No single global transaction is introduced.