Skip to content

Commit be52872

Browse files
committed
Update README with docker-compose details
1 parent 7335757 commit be52872

File tree

1 file changed

+39
-9
lines changed

1 file changed

+39
-9
lines changed

README.md

Lines changed: 39 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -54,22 +54,52 @@ Once changes are implemented here, they need to be updated within the `/chooser`
5454
Final production changes are deployed within vocabulary-theme Releases, updated within [`index-dev-env`][index-dev-env], and finally deployed to `index__stage` and then `index__prod` environments; going LIVE at `https://creativecommons.org/chooser`.
5555

5656

57-
## Setup
58-
1. open the `src/index.html` file within a browser to view the Chooser.
57+
### Setting up the Project
5958

60-
[cc-legal-tools-app]: https://github.com/creativecommons/cc-legal-tools-app
61-
[cc-legal-tools-data]: https://github.com/creativecommons/cc-legal-tools-data
62-
[index-dev-env]: https://github.com/creativecommons/index-dev-env
63-
[index-prototype]: https://github.com/creativecommons/index-prototype
64-
[vocabulary]: https://github.com/creativecommons/vocabulary
65-
[vocabulary-theme]: https://github.com/creativecommons/vocabulary-theme
59+
For information on learning and installing the prerequisite technologies for this project, please see [Foundational technologies — Creative Commons Open Source][found-tech].
6660

61+
[found-tech]: https://opensource.creativecommons.org/contributing-code/foundational-tech/
62+
63+
### Docker Compose Setup
64+
65+
Use the following instructions to start the Project with docker compose.
66+
67+
1. Navigate to the creativecommons/chooser Project that you have cloned
68+
2. **Run the containers**
69+
70+
```shell
71+
docker compose up
72+
```
73+
74+
3. After running the above command, Docker will use the `docker-compose.yml` file and Build a local environment for you
75+
4. Navigate to http://localhost:8080 in your browser and the app would be running.
76+
5. **stop the containers**
77+
78+
To stop the app from running, simply open an another instance of terminal and type:
79+
80+
```shell
81+
docker compose down
82+
```
83+
84+
or
85+
86+
You can simply revisit the existing terminal which is running the container
87+
and type `CTRL + C`
88+
89+
90+
### Format with Prettier
91+
92+
Run the following command to format files with Prettier:
93+
94+
```shell
95+
docker compose exec node prettier --write src/
96+
```
6797

6898
## Structure
6999

70100
The initial markup is rendered via the `index.html` file. Visual display is derived from the `style.css` rules. Styles extend from `src/vocabulary`.
71101

72-
On initlialization the `scripts.js` functions set the correct fieldsets to default display; based on user provided actions through the stepper fieldsets will display or hide, exposing the relevant pathways to getting a `tool` recommendation. Correct pathways are located within the `rawStatePathRoutes` array. When a correct pathway matches the current `state`, the appropriate `tool` is matched and recommended, if the current state is not a known pathway the `tool` is set to `unknown` until the required input is given.
102+
On initialization the `scripts.js` functions set the correct fieldsets to default display; based on user provided actions through the stepper fieldsets will display or hide, exposing the relevant pathways to getting a `tool` recommendation. Correct pathways are located within the `rawStatePathRoutes` array. When a correct pathway matches the current `state`, the appropriate `tool` is matched and recommended, if the current state is not a known pathway the `tool` is set to `unknown` until the required input is given.
73103

74104
The main `tool` recommendation content is pulled via the appropriate `<template>` markup located within HTML. Additional information for the marking formats is also sourced from these `<template>` elements and the contents of the `Attribution Details` fields.
75105

0 commit comments

Comments
 (0)