Skip to content

TACC/Core-CMS-Custom

Repository files navigation

Core-CMS-Custom

Extensions of the Core CMS project

Table of Contents

Related Repositories

Project Architecture

Within a /custom_project_dir can be:

directory contents
src/apps additional Django applications
src/taccsite_cms settings for Core CMS, additional apps, static assets, or middleware
src/taccsite_custom templates and static assets, organized as Django CMS expects

Prerequisites

A CMS project is run using Docker and Docker Compose. Both must be pre-installed on the system on which you will run the CMS.

Note See Core CMS to verify the latest prerequisites.

Start Project

Set up a new local CMS instance.

  1. Core CMS:

    In the /custom_project_dir/ you will run, create a ./src/taccsite_cms/settings_local.py with content from Core-CMS settings_local.example.py.

  2. Docker Containers:

    cd custom_project_dir
    make start
    docker exec -it core_cms /bin/bash
    # This opens a command prompt within the container.
  3. Django Application:

    (Run these commands within the container.)

    python manage.py migrate
    python manage.py createsuperuser
    # To use default "Username" and skip "Email address", press Enter at both prompts.
    # At "Password" prompts, you may use an easy-to-remember password.
    python manage.py collectstatic --no-input
  4. Django CMS:

    1. Open http://localhost:8000/.
    2. Login with the credentials you defined in step 2.
    3. Create one CMS page.
      (With "New page" highlighted, click "Next" button.)
      • This page will automatically be your local homepage.

Note A local machine CMS will be empty. It will not have content from staging nor production. To have that, follow and adapt instructions to copy a database.

Note A local machine CMS does not include nor integrate with an instance of Core Portal. There are no reliable instructions to do either. Help welcome.

Update Project

To update an existing CMS instance.

New Major Core CMS Version (or v3.12)

Read Upgrade Project for developer instructions.

New Branch (or Minor or Patch Core CMS Version)

  1. If CMS Docker files changed, rebuild Docker Containers:

    cd custom_project_dir
    make stop
    make build
    make start
  2. If static assets or database models changed1, update the Django Application:

    docker exec -it core_cms /bin/bash
    # That opens a command prompt within the container.
        python manage.py migrate
        python manage.py collectstatic --no-input
        # If the project has no new/changed assets,
        # then expect output of "0 static files […]"

Run Project

Read the relevant custom_project_dir/README.md.

To run multiple projects, first read Multiple Projects.

Develop Project

Read Django CMS User Guide for CMS user instructions.

Read either of these for developer instructions:

scope reference
relevant to any project Develop Project
specific to one project custom_project_dir/README.md

Build Project

Builds result in images that can be deployed. A build alone is not a deploy.

Automatic Build Manual Build
Occurs for each custom project directory (e.g. demdata_cms) upon each push to main. Follow GitHub Docs: GitHub Actions: Running a Workflow.

Note To check status of any build, see Actions.

Deploy Project

Follow "Core-CMS-Custom" section of How To Build & Deploy.

Port Project

To port a project from Core CMS Resources, read Port Project.

Upgrade Project

To upgrade the Core CMS of an existing project, read Upgrade Project.

Footnotes

  1. Pertinent changes are those in the Core CMS or the custom project. Changes to external assets or databases are not pertinent.