Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: WP-813 CMS customization fails, CMS is old #1034

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,9 @@ After you clone the repository locally, there are several configuration steps re

##### CMS

- Copy `server/conf/cms/secrets.sample.py` to `server/conf/cms/secrets.py`
- Create `server/conf/cms/` settings and secrets files e.g. `touch server/conf/cms/settings_{custom,local}.py && touch server/conf/cms/secrets.py`.

- To emulate a specific CMS project, copy https://github.com/TACC/Core-CMS-Resources/blob/main/__PROJECT_TO_EMULATE__/settings_custom.py to `server/conf/cms/settings_custom.py`

- To override any standard or custom CMS settings, create a `server/conf/cms/settings_local.py`
To populate or customize the CMS, read [Customize a CMS](./docs/customize-cms.md).

#### Build the image for the portal's django container:
make build
Expand Down
22 changes: 22 additions & 0 deletions docs/customize-cms.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Customize a CMS

This is all optional. You can develop Core-Portal without CMS customization.

## Basic

To create your own CMS test **content**, [learn Django CMS as we use it](https://tacc-main.atlassian.net/wiki/x/phdv).

To **emulate** a specific project's CMS **settings**:
1. Visit https://github.com/TACC/Core-Portal-Resources/blob/main/.
2. Navigate to specific project.
3. Use its `cms.settings_custom.py` as your `server/conf/cms/settings_custom.py`.

To **override** any CMS **secrets**, edit `server/conf/cms/settings_local.py`.

To **override** any CMS **settings**, edit `server/conf/cms/settings_local.py`.

## Advanced

To populate content from an existing CMS, follow and adapt instructions to [replicate a CMS database](https://tacc-main.atlassian.net/wiki/x/GwBJAg).

> **Important:** This requires high-level server access or someone to give you a copy of the content.
Original file line number Diff line number Diff line change
@@ -1,43 +1,23 @@
########################
# DJANGO SETTINGS
########################

SECRET_KEY = 'replacethiswithareallysecureandcomplexsecretkeystring'

LOGIN_REDIRECT_URL = '/workbench/dashboard/'

SILENCED_SYSTEM_CHECKS = ['captcha.recaptcha_test_key_error']

########################
# ELASTICSEARCH
# SEARCH
########################

ES_AUTH = 'username:password'
ES_HOSTS = 'http://elasticsearch:9200'
ES_INDEX_PREFIX = 'cep-dev-{}'
ES_DOMAIN = 'https://cep.test'

es_engine = 'haystack.backends.elasticsearch_backend.ElasticsearchSearchEngine'
HAYSTACK_CONNECTIONS = {
'default': {
'ENGINE': es_engine,
'ENGINE': 'haystack.backends.elasticsearch_backend.ElasticsearchSearchEngine',
'URL': ES_HOSTS,
'INDEX_NAME': ES_INDEX_PREFIX.format('cms'),
'KWARGS': {'http_auth': ES_AUTH}
}
}

########################
# RECAPTCHA SETTINGS
########################

RECAPTCHA_PUBLIC_KEY = ''
RECAPTCHA_PRIVATE_KEY = ''
SILENCED_SYSTEM_CHECKS = ['captcha.recaptcha_test_key_error']

########################
# REDMINE TRACKER AUTH
########################

RT_HOST = ''
RT_UN = ''
RT_PW = ''
RT_QUEUE = ''
RT_TAG = ''
wesleyboar marked this conversation as resolved.
Show resolved Hide resolved
7 changes: 5 additions & 2 deletions server/conf/docker/docker-compose-dev.all.debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@
version: "3.8"
services:
cms:
image: taccwma/core-cms:ff737a3
image: taccwma/core-cms:latest
volumes:
- ../cms/secrets.py:/code/taccsite_cms/secrets.py
- ../cms/settings/settings_default.py:/code/taccsite_cms/settings_default.py
- ../cms/settings/settings_custom.py:/code/taccsite_cms/settings_custom.py
- ../cms/settings/secrets.py:/code/taccsite_cms/secrets.py
- ../cms/settings/settings_local.py:/code/taccsite_cms/settings_local.py
- ../cms/uwsgi/uwsgi.ini:/code/uwsgi.ini
- ../../cms/static:/code/static
- ../../cms/media:/code/media
Expand Down