|
| 1 | +### Contrubiting to this Project |
| 2 | +#### Run the Dev Server |
| 3 | +To use Docker to run the source code in a local development environment: |
| 4 | + 1. Clone this repo |
| 5 | + 2. Build the docker image |
| 6 | + * `cd react-json-view` |
| 7 | + * `./docker/build-container.sh` |
| 8 | + * *note:* you may need to use `sudo` to run docker commands |
| 9 | + 3. Run the docker container on port 2000. This will run the webpack-dev-server with hot-reloading enabled. |
| 10 | + * `./docker/dev-server.sh` |
| 11 | + * *note:* you may need to use `sudo` to run the server file |
| 12 | + 4. Open port 2000 in your browser |
| 13 | + * navigate to localhost:2000 |
| 14 | + |
| 15 | +Your source code will be mounted inside the docker container. The container is built on the latest `Node:slim` image. |
| 16 | + |
| 17 | +Webpack-dev-server is running in the container and hot-reloading when changes are made locally. |
| 18 | + |
| 19 | +All node modules are installed within the container, so make sure to rebuild your container if you make changes to package.json (see step 2, above). |
| 20 | + |
| 21 | +#### Run the Production Build |
| 22 | +```bash |
| 23 | +cd react-json-view |
| 24 | +# build the rjv container |
| 25 | +./docker/build-container.sh |
| 26 | +# run the build within your docker container |
| 27 | +./docker/build-dist.sh |
| 28 | +``` |
| 29 | + |
1 | 30 | ### Motivation for adding Docker to your Development Stack |
2 | 31 |
|
3 | 32 | **PSA:** You do not need to use Docker to contribute to this project. If you're not interested in using a container for development, you can ignore this directory. |
@@ -68,32 +97,3 @@ running the app inside a container ensures that environmental inconsistencies li |
68 | 97 | #### more examples |
69 | 98 |
|
70 | 99 | [github-help-wanted](https://github.com/mac-s-g/github-help-wanted) is a newer project that has a simpler docker workflow. |
71 | | - |
72 | | -### Contrubiting to this Project |
73 | | -#### Run the Dev Server |
74 | | -To use Docker to run the source code in a local development environment: |
75 | | - 1. Clone this repo |
76 | | - 2. Build the docker image |
77 | | - * `cd react-json-view` |
78 | | - * `./docker/build-container.sh` |
79 | | - * *note:* you may need to use `sudo` to run docker commands |
80 | | - 3. Run the docker container on port 2000. This will run the webpack-dev-server with hot-reloading enabled. |
81 | | - * `./docker/dev-server.sh` |
82 | | - * *note:* you may need to use `sudo` to run the server file |
83 | | - 4. Open port 2000 in your browser |
84 | | - * navigate to localhost:2000 |
85 | | - |
86 | | -Your source code will be mounted inside the docker container. The container is built on the latest `Node:slim` image. |
87 | | - |
88 | | -Webpack-dev-server is running in the container and hot-reloading when changes are made locally. |
89 | | - |
90 | | -All node modules are installed within the container, so make sure to rebuild your container if you make changes to package.json (see step 2, above). |
91 | | - |
92 | | -#### Run the Production Build |
93 | | -```bash |
94 | | -cd react-json-view |
95 | | -# build the rjv container |
96 | | -./docker/build-container.sh |
97 | | -# run the build within your docker container |
98 | | -./docker/build-dist.sh |
99 | | -``` |
0 commit comments