Fork and clone this repository to your local machine.
-
Navigate to
npm install npm run bothhttp://localhost:8080in the browser to view the application.
NOTE: Checkpackage.jsonto view the scripts and run your desired command.
- Start editing
App.tsxto see changes!
- Create the production bundle with :
npm run build - Run the production build:
Navigate to
npm run starthttp://localhost:8080in the browser to view the application.
-
Build the image with:
docker build -t <YOUR-IMAGE-NAME> -f Dockerfile.dev .Or use the pre-made script in the
package.jsonfile:npm run build-image-devNOTE: This will create a Docker image with the name
react-app-webpack-dev -
Run the container with Docker Compose:
docker-compose -f docker-compose-dev.yml upOr use the pre-made script in the
package.jsonfile:npm run docker-devNOTE: If you manually build the image in Step 1, replace the
imageproperty indocker-compose-dev.ymlwith your correct image name. If you created the image usingnpm run build-image-dev, all should be well.
NOTE: By default, this will create a container namedreact-app-webpack-dev. This can be changed in thedocker-compose-dev.ymlfile under thecontainer_nameproperty.
-
Build the image with:
docker-build -t <YOUR-IMAGE-NAME> .Or use the pre-made script in the
package.jsonfile:npm run build-image-prodNOTE: If you created the image using
npm run build-image-prod, this will create a Docker image with the name:react-app-webpack-prod -
Run the production Docker container with:
docker run --rm --name react-app-webpack-prod -p 3000:3000 react-app-webpack-prodOr use the pre-made script in the
package.jsonfile:npm run docker-prod
