{"id":18610141,"url":"https://github.com/creativecommons/index-dev-env","last_synced_at":"2025-04-10T22:31:55.198Z","repository":{"id":192108217,"uuid":"664809001","full_name":"creativecommons/index-dev-env","owner":"creativecommons","description":"Local development environment for CreativeCommons.org (product name: index)","archived":false,"fork":false,"pushed_at":"2024-07-10T15:27:04.000Z","size":295,"stargazers_count":2,"open_issues_count":5,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-07-10T18:45:50.343Z","etag":null,"topics":["wordpress"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/creativecommons.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["creativecommons"],"custom":["https://creativecommons.org/donate"]}},"created_at":"2023-07-10T19:50:43.000Z","updated_at":"2024-07-10T15:27:06.000Z","dependencies_parsed_at":"2024-01-22T19:35:38.233Z","dependency_job_id":"7039efaa-b3b9-455a-a3a4-aabd8f32f218","html_url":"https://github.com/creativecommons/index-dev-env","commit_stats":null,"previous_names":["creativecommons/index-dev-env"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/creativecommons%2Findex-dev-env","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/creativecommons%2Findex-dev-env/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/creativecommons%2Findex-dev-env/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/creativecommons%2Findex-dev-env/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/creativecommons","download_url":"https://codeload.github.com/creativecommons/index-dev-env/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223449812,"owners_count":17146984,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["wordpress"],"created_at":"2024-11-07T03:08:41.719Z","updated_at":"2025-04-10T22:31:55.184Z","avatar_url":"https://github.com/creativecommons.png","language":"Shell","funding_links":["https://github.com/sponsors/creativecommons","https://creativecommons.org/donate"],"categories":[],"sub_categories":[],"readme":"# index-dev-env\n\nLocal development environment for CreativeCommons.org (product name: `index`).\n\n\n## Overview\n\nThis repository has the configuration required to run the CreativeCommons.org\nwebsite in a local Docker development environment.\n\nThe CreativeCommons.org website is comprised of five components that are split\ninto two categories:\n- dynamic component:\n  - WordPress (Vocabulary Theme)\n- static components:\n  - Chooser\n  - FAQ\n  - Legal Tools (licenses and public domain)\n  - Platform Toolkit\n\n\n### Component repositories\n\nPath label|Path|Component name|Component repositories\n----------|----|--------------|----------------------\nChooser|`/choose`|Chooser|[chooser][gh-chooser]\nFAQ|`/faq`|FAQ|[faq][gh-faq]\nLicenses| `/licenses`|CC Legal Tools|[cc-legal-tools-app][gh-app], [cc-legal-tools-data][gh-data]\nPlatform Toolkit|`/platform/toolkit`|Platform Toolkit|[mp][gh-mp]\nPublic Domain|`/publicdomain`|CC Legal Tools|[cc-legal-tools-app][gh-app], [cc-legal-tools-data][gh-data]\nWordPress|`/` (default)|Vocabulary Theme|[vocabulary-theme][gh-vocab-theme]\n\n[gh-chooser]: https://github.com/creativecommons/chooser\n[gh-faq]: https://github.com/creativecommons/faq\n[gh-app]: https://github.com/creativecommons/cc-legal-tools-app\n[gh-data]: https://github.com/creativecommons/cc-legal-tools-data\n[gh-mp]: https://github.com/creativecommons/mp\n[gh-vocab-theme]: https://github.com/creativecommons/vocabulary-theme\n\n\n## Code of conduct\n\n[`CODE_OF_CONDUCT.md`][org-coc]:\n\u003e The Creative Commons team is committed to fostering a welcoming community.\n\u003e This project and all other Creative Commons open source projects are governed\n\u003e by our [Code of Conduct][code_of_conduct]. Please report unacceptable\n\u003e behavior to [conduct@creativecommons.org](mailto:conduct@creativecommons.org)\n\u003e per our [reporting guidelines][reporting_guide].\n\n[org-coc]: https://github.com/creativecommons/.github/blob/main/CODE_OF_CONDUCT.md\n[code_of_conduct]: https://opensource.creativecommons.org/community/code-of-conduct/\n[reporting_guide]: https://opensource.creativecommons.org/community/code-of-conduct/enforcement/\n\n\n## Contributing\n\nSee [`CONTRIBUTING.md`][org-contrib].\n\n[org-contrib]: https://github.com/creativecommons/.github/blob/main/CONTRIBUTING.md\n\n\n## Docker containers\n\nThe [`docker-compose.yml`](docker-compose.yml) file defines the following\ncontainers:\n1. **index-db** - Database server for WordPress\n2. **index-phpmyadmin** - Database administration\n   - [localhost:8003](http://localhost:8003/)\n3. **index-web** - Web server (WordPress and static HTML components)\n   - **[localhost:8080](http://localhost:8080/)**\n\n\n## Setup\n\n1. Ensure the following repositories are cloned adjacent to this repository:\n    ```\n    PARENT_DIR\n    ├── cc-legal-tools-data\n    ├── chooser\n    ├── dev-index-env\n    ├── faq\n    └── mp\n    ```\n   - [creativecommons/cc-legal-tools-data][gh-data]\n   - [creativecommons/chooser][gh-chooser]\n   - [creativecommons/faq][gh-faq]\n   - [creativecommons/mp][gh-mp]\n2. Create the `.env` file:\n    ```shell\n    cp .env.example .env\n    ```\n3. Update `.env` to set desired values for variables (`WP_VERSION`,\n   `WP_MOD_TYPE`, `WP_MOD_NAME`, etc.)\n4. Build/start Docker:\n    ```shell\n    docker compose up\n    ```\n5. Wait for build and initialization to complete\n6. Setup WordPress:\n    ```shell\n    ./setup-wordpress.sh\n    ```\n7. _Optional (CC staff only):_ import production data\n   1. Ensure you have access to the production server and your local machine\n      is properly configured to access it\n   2. Pull production data\n        ```shell\n        ./staff_migrate.sh pull\n        ```\n   3. Import production data\n        ```shell\n        ./staff_migrate.sh import\n        ```\n\n\n## Path URLs\n\nPath label|Dev link|Stage link|Prod link\n----------|--------|----------|---------\nChooser|[Dev `/choose`][d1]|[Stage `/choose`][s1]|[Prod `/choose`][p1]\nFAQ|[Dev `/faq`][d2]|[Stage `/faq`][s2]|[Prod `/faq`][p2]\nLicenses|[Dev `/licenses`][d3]|[Stage `/licenses`][s3]|[Prod `/licenses`][p3]\nPlatform Toolkit|[Dev `/platform/toolkit`][d4]|[Stage `/platform/toolkit`][s4]|[Prod `/platform/toolkit`][p4]\nPublic Domain|[Dev `/publicdomain`][d5]|[Stage `/publicdomain`][s5]|[Prod `/publicdomain`][p5]\nWordPress|[Dev `/` (default)][d6]|[Stage `/` (default)][s6]|[Prod `/` (default)][p6]\nWordPress Admin|[Dev `/wp-admin`][d7]|[Stage `/wp-admin`][s7]|[Prod `/wp-admin`][p7]\n\n[d1]: http://localhost:8080/choose \"Dev Chooser /choose\"\n[d2]: http://localhost:8080/faq \"Dev FAQ /faq\"\n[d3]: http://localhost:8080/licenses \"Dev Licenses /licenses\"\n[d4]: http://localhost:8080/platform/toolkit \"Dev Platform Toolkit /platform/toolkit\"\n[d5]: http://localhost:8080/publicdomain \"Dev Public Domain /publicdomain\"\n[d6]: http://localhost:8080/ \"Dev WordPress / (default)\"\n[d7]: http://localhost:8080/wp-admin/ \"Dev WordPress Admin /wp-admin\"\n\n[s1]: https://stage.creativecommons.org/choose \"Stage Chooser /choose\"\n[s2]: https://stage.creativecommons.org/faq \"Stage FAQ /faq\"\n[s3]: https://stage.creativecommons.org/licenses \"Stage Licenses /licenses\"\n[s4]: https://stage.creativecommons.org/platform/toolkit \"Stage Platform Toolkit /platform/toolkit\"\n[s5]: https://stage.creativecommons.org/publicdomain \"Stage Public Domain /publicdomain\"\n[s6]: https://stage.creativecommons.org/ \"Stage WordPress / (default)\"\n[s7]: https://stage.creativecommons.org/wp-admin/ \"Stage WordPress Admin /wp-admin\"\n\n[p1]: https://creativecommons.org/choose \"Prod Chooser /choose\"\n[p2]: https://creativecommons.org/faq \"Prod FAQ /faq\"\n[p3]: https://creativecommons.org/licenses \"Prod Licenses /licenses\"\n[p4]: https://creativecommons.org/platform/toolkit \"Prod Platform Toolkit /platform/toolkit\"\n[p5]: https://creativecommons.org/publicdomain \"Prod Public Domain /publicdomain\"\n[p6]: https://creativecommons.org/ \"Prod WordPress / (default)\"\n[p7]: https://creativecommons.org/wp-admin/ \"Prod WordPress Admin /wp-admin\"\n\n\n## Dev configuration\n\n\n### Apache2\n\nSee [`config/web-sites-available/000-default.conf`][dev-webconfig].\n\n[dev-webconfig]: config/web-sites-available/000-default.conf\n\n\n### WordPress core\n\n| Name      | Version |\n| --------- | ------- |\n| WordPress | `6.3.1`   |\n\nAlso see [`.env.example`](.env.example).\n\n\n### WordPress plugins\n\n| Name                                                     | Version  |\n| -------------------------------------------------------- | -------- |\n| [Advanced Custom Fields][adv-custom-fields]              | `6.2.1`  |\n| [Advanced Custom Fields: Menu Chooser][acf-menu-chooser] | `1.1.0`  |\n| [Classic Editor][classic-editor]                         | `1.6.3`  |\n| [Monster Insights Google Analytics][monster-insights]    | `8.19`   |\n| [Redirection][redirection]                               | `5.3.10` |\n| [Tablepress][tablepress]                                 | `2.1.7`  |\n| [Wordfence][wordfence]                                   | `7.10.4` |\n| [WordPress Importer][wp-importer]                        | `0.8.1`  |\n| [Yoast SEO][yoast-seo]                                   | `21.2`   |\n\nAlso see [`config/composer/composer.json`](config/composer/composer.json).\n\n[adv-custom-fields]: https://wordpress.org/plugins/advanced-custom-fields/\n[acf-menu-chooser]: https://github.com/reyhoun/acf-menu-chooser\n[classic-editor]: https://wordpress.org/plugins/classic-editor/\n[monster-insights]: https://wordpress.org/plugins/google-analytics-for-wordpress/\n[redirection]: https://wordpress.org/plugins/redirection/\n[tablepress]: https://wordpress.org/plugins/tablepress/\n[wordfence]: https://wordpress.org/plugins/wordfence/\n[wp-importer]: https://wordpress.org/plugins/wordpress-importer/\n[yoast-seo]: https://wordpress.org/plugins/wordpress-seo/\n\n\n### WordPress themes\n\n| Name                                 | Version  |\n| ------------------------------------ | -------- |\n| [Vocabulary Theme][gh-vocab-theme]   | `1.11.1`    |\n\nAlso see [`config/composer/composer.json`](config/composer/composer.json).\n\n\n## Stage and Prod configuration\n\nThe staging server and production server are configured via Salt managed in the\n[creativecommons/sre-salt-prime][sre-salt-prime] repository. The list below\ninclude the specifics (is non-exhaustive):\n- `pillars/`\n  - [`3_HST/index/`][salt-hst-index]\n  - [`5_HST__POD/index__stage`][salt-hst-pod-index]\n- `states/`\n  - [`apache2/files/index.conf`][salt-index-conf]\n  - [`wordpress/files/index-composer.json`][salt-index-composer]\n  - [`wordpress/index.sls`][salt-wordpress-index]\n\n[sre-salt-prime]: https://github.com/creativecommons/sre-salt-prime\n[salt-hst-index]: https://github.com/creativecommons/sre-salt-prime/tree/main/pillars/3_HST/index\n[salt-hst-pod-index]: https://github.com/creativecommons/sre-salt-prime/tree/main/pillars/5_HST__POD/index__stage\n[salt-index-conf]: https://github.com/creativecommons/sre-salt-prime/blob/main/states/apache2/files/index.conf\n[salt-index-composer]: https://github.com/creativecommons/sre-salt-prime/blob/main/states/wordpress/files/index-composer.json\n[salt-wordpress-index]: https://github.com/creativecommons/sre-salt-prime/blob/main/states/wordpress/index.sls\n\n\n## Copying\n\n[![CC0 1.0 Universal (CC0 1.0) Public Domain Dedication\nbutton][cc-zero-png]][cc-zero]\n\n[`COPYING`](COPYING): All the content within this repository is dedicated to\nthe public domain under the [CC0 1.0 Universal (CC0 1.0) Public Domain\nDedication][cc-zero].\n\n[cc-zero-png]: https://licensebuttons.net/l/zero/1.0/88x31.png \"CC0 1.0 Universal (CC0 1.0) Public Domain Dedication button\"\n[cc-zero]: https://creativecommons.org/publicdomain/zero/1.0/ \"Creative Commons — CC0 1.0 Universal\"\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcreativecommons%2Findex-dev-env","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcreativecommons%2Findex-dev-env","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcreativecommons%2Findex-dev-env/lists"}