-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: rewrite README, cleanup non-APCD projects (#172)
- Loading branch information
1 parent
adc94e9
commit 8a08605
Showing
14 changed files
with
281 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
# Port Project | ||
|
||
## From [Core CMS Resources] | ||
|
||
To porting a downstream CMS project from [Core CMS Resources] to this repository: | ||
|
||
1. Copy contents: | ||
- from [Core CMS Resources] `/taccsite_custom/custom_project_dir` | ||
- to `/custom_project_dir/src/taccsite_custom/custom_project_dir` | ||
|
||
> **Warning** | ||
> The name **must** use underscores (**not** dashes) to be a valid Python application. | ||
2. Move custom project settings: | ||
- from `/custom_project_dir/src/taccsite_custom/custom_project_dir/settings_custom.py` | ||
- to `/custom_project_dir/src/taccsite_cms/settings_custom.py` | ||
3. If the custom project has any edge cases, review relevant instructions: | ||
- [Old Custom Templates Directory](#old-custom-templates-directory) | ||
- [Expects CSS Build Step](expects-css-build-step) | ||
- [Expects CSS Concatenation](expects-css-concatenation) | ||
|
||
### Old Custom Templates Directory | ||
|
||
**If** the custom project directory: | ||
|
||
- **both** had a name with dashes in [Core CMS Resources] | ||
- **and** has `templates/standard.html` or `templates/fullwidth.html` | ||
|
||
Then: | ||
|
||
1. Copy the templates to become placeholders: | ||
- from `taccsite_custom/custom_project_dir/templates` | ||
- to `taccsite_custom/custom-project-dir/templates` | ||
|
||
> **Warning** | ||
> The name `custom-project-dir` **must** match the old name as it was, including dashes. | ||
2. Edit the placeholder templates to extend the new templates e.g. | ||
|
||
```django | ||
{% extends "custom_project_dir/templates/standard.html" %} | ||
``` | ||
|
||
### Expects CSS Build Step | ||
|
||
**If** the custom project directory expects CSS compilation e.g. has | ||
|
||
- `css/src/*.css` with `@import` of a `@tacc/core-styles/` path | ||
|
||
Then: | ||
|
||
1. Contact https://github.com/wesleyboar. | ||
|
||
> **Note** | ||
> Those imports assume: | ||
> | ||
> - Node | ||
> - NPM package `@tacc/core-styles` | ||
> - a CSS build script | ||
> | ||
> Whether to support those here, and how to port without support for those, has not been decided. | ||
### Expects CSS Concatenation | ||
|
||
**If** the custom project directory expects CSS concatenation e.g. has | ||
|
||
- `css/src/*.css` with `@import` of a relative path | ||
|
||
Then: | ||
|
||
1. Rename import paths appended with comment `Core-CMS:/taccsite_cms/…/`: | ||
- from `**/*.css` | ||
- to `/static/site_cms/css/build/*.css` | ||
2. Rename relative import paths (e.g. `./**/*.css`): | ||
- from `**/*.css` | ||
- to `/static/custom_project_dir/css/build/*.css` | ||
3. Add UI test steps to initial deploy of ported custom project. | ||
|
||
<!-- Link Aliases --> | ||
|
||
[Core CMS Resources]: https://github.com/TACC/Core-CMS-Resources |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# Run Project | ||
|
||
## Individual Projects | ||
|
||
Read the relevant `custom_project_dir/README.md`. | ||
|
||
## Multiple Projects | ||
|
||
> **Note** | ||
> By default, multiple projects can not be run simultaneously.[^1] | ||
To stop one project, and run another: | ||
|
||
1. Cancel any active `make start` output i.e. press <kbd>control</kbd> + <kbd>C</kbd>. | ||
|
||
2. Take down one project. | ||
|
||
> **Note** | ||
> This is equivalent to deleting the relevant set of related containers in Docker Desktop. | ||
```sh | ||
cd custom_project_dir_1 | ||
make stop | ||
``` | ||
|
||
3. Start another project. | ||
|
||
> **Note** | ||
> This remove containers, but not volumes e.g. database. | ||
```sh | ||
cd custom_project_dir_2 | ||
make start | ||
``` | ||
|
||
[^1]: If you want to run multiple projects simultaneously, see [Simultaneous Projects](#simultaneous-projects). | ||
|
||
## Simultaneous Projects | ||
|
||
> **Warning** | ||
> With these instructions, you will **not** be able to use the database (**nor** internal search index) of an already set up custom project (i.e. its local volumes).[^2] | ||
To run multiple projects simultaneously: | ||
|
||
1. Stop and take down any started projects. (See [Multiple Projects](#multiple-projects) step 2.) | ||
1. Create a custom `docker-compose.dev.yml` in your project. | ||
2. Replace all instances of the text `core_cms` with the name of the `custom_project_dir`. | ||
|
||
[^2]: Advanced adaptation of these instructions may support retaining database access, et cetera. | ||
|
||
[copy a database]: https://confluence.tacc.utexas.edu/pages/viewpage.action?pageId=249135195 |
Oops, something went wrong.