This setup allows you to run react project in both DEV and PROD modes using docker environment.
If you want to use
npm
instead, just replace allyarn
instances to corresponding npm commands
To start developing react you should firstly install all packages in node_modules
folder locally and only after that start docker container.
Production mode doesn't require node_modules
folder.
yarn install
oryarn
./docker-scripts.sh
./docker-scripts.sh prod
Add
-d
to run container detached
./docker-scripts.sh prod:build
Add
-d
to run container detached
./docker-scripts.sh stop
Read about traefik setup