-
Notifications
You must be signed in to change notification settings - Fork 1
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
Support custom apps through config. #517
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it make more sense to move apps/custom_example
to a separate sample repository that has a Dockerfile that demonstrates a downstream repository's structure? We could approve this PR and build a hashed image before building the sample repository. So the Dockerfile in the other repo might be:
FROM tacc/core-cms:tag_for_this_PR
COPY /apps/custom_example /apps
etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, after this PR, how Core-CMS-Resources need not be a submodule.
Steps
-
Each Core-CMS-Resources directory becomes a repo or moves into
tup-ui:/libs
. -
A project
urls.py
andsettings_custom.py
would be loaded as a custom app's. -
To load project static files, a CMS
STATICFILES_DIR
entry would point outside CMS.Code Change
change
Core-CMS/taccsite_cms/settings.py
Lines 215 to 217 in f65d0c4
) + tuple(glob( os.path.join(BASE_DIR, 'taccsite_custom', '*', 'static') )) to
os.path.join(PATH_TO_THE_PROJECT_TO_RUN, 'static') )
-
Which then means to locally run a project, Python needs access to project name.
Ideas
- Developer can add a local
docker_repo.var
, the same file Jenkins config uses. - We can use a
.env
, and update Jenkins config to read it instead.
- Developer can add a local
-
To load project
templates/
, a CMSTEMPLATES
DIRS
entry would point outside CMS.Code Change
change
Core-CMS/taccsite_cms/settings.py
Lines 228 to 230 in f65d0c4
'DIRS': glob( os.path.join(BASE_DIR, 'taccsite_custom') ) + [ to
'DIRS': [ os.path.join(PATH_TO_THE_PROJECT_TO_RUN, 'templates')
Not as proper as a project cms app (poc) building off a a core cms app (poc), but at least it is not a submodule.
We do not necessarily need them to be the same repo. They could, in theory, exist in the same Core-Cms-Resources repo where each directory has its own Dockerfile. It would require a little bit of tweaking to the Jenkins build job but would otherwise look the same from a Jenkins user's perspective. |
Then I am excited. That is something I would like to see and learn from. I thought our Jenkins could not clone multiple repos in one job, thus could not mix and match content to build from, so I gave up on a Jenkins solution. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested. Nothing breaks. Looks safe.
I don't immediately know how to use it, but it is required by https://github.com/TACC/tup-cms/tree/task/TUP-250--taccsite_custom-static-content which also works, and I do understand the use case of.
Overview
Add support for custom apps through
custom_app_settings.py
andurls_custom.py
Related
Changes
Testing
custom_app_settings.example.py
intocustom_app_settings.py
adnurls_custom.example.py
intourls_custom.py
custom_example
app being rendered.Screenshots