Extensions of the Core CMS project
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 |
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.
[^2]: On a Mac or a Windows machine, we recommended you install Docker Desktop, which will install both Docker and Docker Compose as well as Docker Machine, which is required to run Docker on Mac/Windows hosts.
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-CMS settings_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:
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.
Read Upgrade Project for developer instructions.
If CMS Docker files changed, rebuild Docker Containers:
cd custom_project_dir
make stop
make build
make start
If static assets or database models changed[^1], 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 […]"
[^1]: Pertinent changes are those in the Core CMS or the custom project. Changes to external assets or databases are not pertinent.
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.