Skip to content

Test CMS Changes

W. Bomar edited this page Apr 6, 2021 · 22 revisions

Via Local CMS Docker Image on Local Standalone CMS

  1. Have an existing Core-CMS.
  2. (If docker containers are running) Stop (i.e. bring down) the docker containers.
  3. Checkout relevant branch.
  4. Run command npm run build.
  5. Start (i.e. bring up) the docker containers.

Via Remote CMS Docker Image on Local Standalone CMS

Warning: These steps have not been thoroughly verified.

  1. Have an existing Core-CMS.

  2. (If docker containers are running) Stop (i.e. bring down) the docker containers.

  3. Checkout relevant branch.

  4. Delete /static directory.

  5. Delete local build directories:

    • rm -rf taccsite_cms/static/*/css/build
    • rm -rf taccsite_custom/*/static/*/css/build
  6. In the relevant docker-compose config file, update the services:cms:image value to a provided docker image tag.

  7. Rebuild the cms docker container without cache.

    1. docker-compose build --no-cache cms (beware of -f
    2. docker-compose up --force-recreate --no-deps -d cms (beware of -f
    3. Start (i.e. bring up), stop (i.e. bring down), then re-start (i.e. bring up) the docker containers.²
  8. Start (i.e. bring up) the docker containers.

  9. In the CMS container, run python manage.py collectstatic --no-input.

Footnotes
  1. Do NOT use -f docker-compose.dev.yml (nor docker-compose.custom.yml based on docker-compose.dev.yml), because the - .:/code entry for volumes will overwrite the Docker's freshly, internally built build directories (with the emptied directories in step 5).
  2. The first start may hit a database contact error, Name or service not known. The second start should not.

Via Remote CMS Docker Image on Local Portal (with CMS)

Warning: These steps have not been thoroughly verified.

  1. Have an existing Core-Portal.
  2. (If docker containers are running) Stop (i.e. bring down) the dockers.
  3. Checkout relevant branch.
  4. Delete /server/cms/static directory.
  5. In the relevant docker-compose config file, update the services:cms:image value to a provided docker image tag.
  6. Rebuild the cms docker container without cache.
  7. Start (i.e. bring up) the docker containers.
  8. In the CMS container, run python manage.py collectstatic --no-input.