Extensions of the Core CMS project
- Related Repositories
- Project Architecture
- Prerequisites
- Start Project
- Update Project
- Run Project
- Develop Project
- Build Project
- Deploy Project
- Port Project
- Upgrade Project
- Camino, a Docker container-based deployment scheme
- Core CMS, the base CMS code for TACC WMA CMS Websites
- Core Portal, the base Portal code for TACC WMA CMS Websites
- Core Styles, the shared UI pattern code for TACC WMA CMS Websites
- Core CMS Resources, the old solution for extensions of the Core CMS project
- Core Portal Deployments, private repository that facilitates deployments of Core Portal images via Camino and Jenkins
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 |
- Docker ≥ v20
- Docker Compose ≥ v1
- Python ≥ v3.8
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.
Set up a new local CMS instance.
-
Core CMS:
In the
/custom_project_dir/
you will run, create a./src/taccsite_cms/settings_local.py
with content from Core-CMSsettings_local.example.py
. -
Docker Containers:
cd custom_project_dir make start
docker exec -it core_cms /bin/bash # This opens a command prompt within the container.
-
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
-
Django CMS:
- Open http://localhost:8000/.
- Login with the credentials you defined in step 2.
- 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.
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)
-
If CMS Docker files changed, rebuild Docker Containers:
cd custom_project_dir make stop make build make start
-
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 […]"
Read the relevant custom_project_dir/README.md
.
To run multiple projects, first read Multiple Projects.
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 |
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.
Follow "Core-CMS-Custom" section of How To Build & Deploy.
To port a project from Core CMS Resources, read Port Project.
To upgrade the Core CMS of an existing project, read Upgrade Project.
Footnotes
-
Pertinent changes are those in the Core CMS or the custom project. Changes to external assets or databases are not pertinent. ↩