Locally Develop CMS and TUP CMS - TACC/Core-CMS GitHub Wiki

Overview

In Core-CMS make changes. Build a CMS image. In client repo, use the CMS image snapshot.

Steps

First, In Core-CMS Clone

Build and save a CMS container image.

Build a CMS Image Remotely (Requires Access)

Follow (internal) How To Docs - How To Build & Deploy a CMS Website - Core-CMS.

Build a CMS Image Locally (More Steps)

Note If another CMS container is running, shut it down.

Important If you have changed any dependencies (e.g. Locally Develop CMS and Styles), pin those changes via appropriate lock file (e.g. npm install --save …); otherwise the build step will overwrite those changes.

  1. docker-compose -f docker-compose.dev.yml build --build-arg BUILD_ID="my-local-build-N"
    Where my-local-build should be unique each time, to trigger a new stylesheet build.
  2. docker-compose -f docker-compose.dev.yml up --detach
  3. docker exec -it core_cms sh -c "python manage.py collectstatic --no-input"
  4. (optional) Verify your change is present on your Core-CMS.
  5. docker commit core_cms
    The output (with or without sha256:) is your __IMAGE_ID__.
  6. docker tag __IMAGE_ID__ __LOCAL_TAG_NAME__
    You may choose any name you would like for __LOCAL_TAG_NAME__.
  7. docker-compose -f docker-compose.dev.yml stop

The container snapshot steps are a streamlined version of (internal) How to Create Docker Image from Local Container.

Then, In Client Repo Clone

Use the CMS container image.

Note If another CMS container is running, shut it down.

  1. Open apps/tup-cms/Dockerfile for editing.
  2. Change FROM taccwma/core-cms:... to FROM __LOCAL_TAG_NAME__.
    Or the tag name of any other image you want to test.
  3. docker-compose -f apps/tup-cms/docker-compose.dev.yml build --no-cache
  4. npx nx serve tup-cms
  5. Verify your change is present.

Undocumented.

a Different Client of Core-CMS

Refer to client repo documentation.

⚠️ **GitHub.com Fallback** ⚠️