Skip to content

Commit

Permalink
refactor: setings_default.py
Browse files Browse the repository at this point in the history
  • Loading branch information
wesleyboar committed Dec 9, 2024
1 parent 59a72f8 commit 3e299d0
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 36 deletions.
25 changes: 16 additions & 9 deletions docs/customize-cms.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,27 @@ This is all optional. You can develop Core-Portal without CMS customization.

## Basic

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

To be able to customize CMS **settings**:
1. Run `make stop`.
2. Delete `server/conf/cms/settings_*.py` **directories**.
3. Create CMS settings files:
```sh
touch server/conf/cms/settings_custom.py
touch server/conf/cms/secrets.py
touch server/conf/cms/settings_local.py
```
4. Run `make start`.

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 standard or custom CMS settings, edit `server/conf/cms/settings_local.py`.
To **override** any CMS **secrets**, edit `server/conf/cms/settings_local.py`.
> **Note:** If your `settings_custom.py` and `settings_local.py` are directories, then they were not properly created before starting environment. To fix:
> 1. Run `make stop`.
> 2. Delete directories named `settings_….py`
> 3. [Add CMS settings.](../README.md#CMS)
> 4. Run `make start`.
To **override** any CMS **settings**, edit `server/conf/cms/settings_local.py`.
## Advanced
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
########################
# DJANGO
########################

SECRET_KEY = 'replacethiswithareallysecureandcomplexsecretkeystring'

LOGIN_REDIRECT_URL = '/workbench/dashboard/'

SILENCED_SYSTEM_CHECKS = ['captcha.recaptcha_test_key_error']

########################
# SEARCH
########################
Expand All @@ -22,13 +21,3 @@
'KWARGS': {'http_auth': ES_AUTH}
}
}

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

RT_HOST = ''
RT_UN = ''
RT_PW = ''
RT_QUEUE = ''
RT_TAG = ''
17 changes: 4 additions & 13 deletions server/conf/docker/docker-compose-dev.all.debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,10 @@ services:
cms:
image: taccwma/core-cms:latest
volumes:
- type: bind
source: ../cms/secrets.py
target: /code/taccsite_cms/secrets.py
read_only: true
- type: bind
source: ../cms/settings_local.py
target: /code/taccsite_cms/settings_local.py
read_only: true
- type: bind
source: ../cms/settings_custom.py
target: /code/taccsite_cms/settings_custom.py
read_only: true
- ../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 Expand Up @@ -155,7 +147,6 @@ services:
container_name: frontera_docs

volumes:
core_portal_cms:
core_portal_redis_data:
core_portal_es_data:
core_portal_rabbitmq_data:
Expand Down

0 comments on commit 3e299d0

Please sign in to comment.