Local development environment for CreativeCommons.org (project name: index).
This repository manages the local development environment for
CreativeCommons.org (project name: index). It relies on Docker and requires
the component repositories.
The Creative Commons team is committed to fostering a welcoming community. This project and all other Creative Commons open source projects are governed by our Code of Conduct. Please report unacceptable behavior to conduct@creativecommons.org per our reporting guidelines.
See CONTRIBUTING.md.
The CreativeCommons.org website (project name: index) is comprised of five
components that are split into two categories:
- Static components
- CC Legal Tools ("licenses")
- Chooser
- FAQ
- Platform Toolkit
- Dynamic component
- WordPress (Vocabulary Theme)
| Component name | Component repositories |
|---|---|
| CC Legal Tools | cc-legal-tools-app, cc-legal-tools-data |
| Chooser | chooser |
| FAQ | faq |
| Platform Toolkit | mp |
The following URIs and their children/subpaths mustn't be used by WordPress. They are reserved for the static components:
| Path | Component name |
|---|---|
/cc-legal-tools |
CC Legal Tools |
/choose |
Chooser |
/chooser |
Chooser |
/faq |
FAQ |
/licence |
CC Legal Tools |
/licences |
CC Legal Tools |
/license |
CC Legal Tools |
/licenses |
CC Legal Tools |
/ns |
CC Legal Tools |
/ns.html |
CC Legal Tools |
/platform |
Platform Toolkit |
/rdf |
CC Legal Tools |
/schema.rdf |
CC Legal Tools |
These URIs are controlled by Apache2 configurations:
- Dev:
config/web-sites-available/000-default.conf - Prod:
sre-salt-prime:states/apache2/files/index.conf- (Also see Stage and Prod configuration, below)
- shared:
cc-legal-tools-data:config/language-redirects
| Component name | Component repository |
|---|---|
| WordPress | vocabulary-theme |
WordPress is the default handler for URIs. WordPress handles all URIs except the Static component URIs, listed above.
The docker-compose.yml file defines the following
containers:
- index-db - Database server for WordPress
- index-phpmyadmin - Database administration
- index-web - Web server (WordPress and static HTML components)
- Ensure the following repositories are cloned adjacent to this repository:
PARENT_DIR ├── cc-legal-tools-data ├── chooser ├── dev-index-env ├── faq └── mp- [creativecommons/cc-legal-tools-data][gh-data]
- [creativecommons/chooser][gh-chooser]
- [creativecommons/faq][gh-faq]
- [creativecommons/mp][gh-mp]
- Create the
.envfile:cp .env.example .env
- Update
.envto set desired values for variables (WP_VERSION,WP_MOD_TYPE,WP_MOD_NAME, etc.) - Build/start Docker:
docker compose up
- Wait for build and initialization to complete
- Setup WordPress:
./setup-wordpress.sh
- Optional (CC staff only): import production data
- Ensure you have access to the production server and your local machine is properly configured to access it
- Pull production data
./staff_migrate.sh pull
- Import production data
./staff_migrate.sh import
| Path label | Dev link | Stage link | Prod link |
|---|---|---|---|
| Chooser | Dev /choose |
Stage /choose |
Prod /choose |
| FAQ | Dev /faq |
Stage /faq |
Prod /faq |
| Licenses | Dev /licenses |
Stage /licenses |
Prod /licenses |
| Platform Toolkit | Dev /platform/toolkit |
Stage /platform/toolkit |
Prod /platform/toolkit |
| Public Domain | Dev /publicdomain |
Stage /publicdomain |
Prod /publicdomain |
| WordPress | Dev / (default) |
Stage / (default) |
Prod / (default) |
| WordPress Admin | Dev /wp-admin |
Stage /wp-admin |
Prod /wp-admin |
See config/web-sites-available/000-default.conf.
| Name | Version |
|---|---|
| WordPress | 6.3.1 |
Also see .env.example.
| Name | Version |
|---|---|
| Advanced Custom Fields | 6.2.1 |
| Advanced Custom Fields: Menu Chooser | 1.1.0 |
| Classic Editor | 1.6.3 |
| Monster Insights Google Analytics | 8.19 |
| Redirection | 5.3.10 |
| Tablepress | 2.1.7 |
| Wordfence | 7.10.4 |
| WordPress Importer | 0.8.1 |
| Yoast SEO | 21.2 |
Also see config/composer/composer.json.
| Name | Version |
|---|---|
| [Vocabulary Theme][gh-vocab-theme] | 2.6.3 |
Also see config/composer/composer.json.
vocabulary-theme release testing QA checklist (click to expand)
- run setup-wp script (again to make sure WP is current version)
- be sure to clear/disable caches locally
- review any new context/template/page
- review pages:
The staging server and production server are configured via Salt managed in the creativecommons/sre-salt-prime repository. The list below include the specifics (is non-exhaustive):
pillars/states/
COPYING: All the content within this repository is dedicated to
the public domain under the CC0 1.0 Universal (CC0 1.0) Public Domain
Dedication.
