Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ COPY --chown=appuser:appuser api/alembic/ ./alembic/
COPY --chown=appuser:appuser api/scripts/run_migrations.py ./scripts/run_migrations.py
COPY --chown=appuser:appuser packages/learn-to-cloud-shared/src/learn_to_cloud_shared/content/phases /app/content/phases

ENV CONTENT_DIR="/app/content/phases"
ENV CONTENT__DIR="/app/content/phases"

CMD ["python", "scripts/run_migrations.py"]

Expand Down
2 changes: 1 addition & 1 deletion api/scripts/run_migrations.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
The sync CLI lives inside the installed package
(``learn_to_cloud_shared.cli.sync_curriculum``) rather than a filesystem
script. The migration image copies curriculum YAML separately and points
``CONTENT_DIR`` at that path, so the API image does not need to ship YAML.
``CONTENT__DIR`` at that path, so the API image does not need to ship YAML.
``python -m`` finds the module via the wheel's import path, which is
portable across local devcontainer, CI, and production.
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Importable CLI entry point for the deploy-time curriculum sync.

Usage (anywhere the ``learn-to-cloud-shared`` wheel is installed and
``CONTENT_DIR`` points at ``content/phases``)::
``CONTENT__DIR`` points at ``content/phases``)::

python -m learn_to_cloud_shared.cli.sync_curriculum

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Deploy-time sync from YAML curriculum to DB tables (issue #463).

Reads the authored curriculum YAML from ``CONTENT_DIR`` in production,
Reads the authored curriculum YAML from ``CONTENT__DIR`` in production,
runs the strict cross-file validators, and upserts every curriculum entity
into its corresponding DB table. Entities no longer present in YAML are
soft-deleted; entities that reappear (same UUID) have their ``deleted_at``
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
``content_db_loader.py`` via the public ``content_service`` module. The YAML
loader is still authoritative for deploy-time YAML to DB sync
(``content_sync.py``) and for the strict cross-file validators run in CI.
Production migration jobs provide the YAML path through ``CONTENT_DIR``.
Production migration jobs provide the YAML path through ``CONTENT__DIR``.

Do not import from this module in request-serving code paths. Use
``learn_to_cloud_shared.content_service`` (async, DB-backed) instead.
Expand Down