This setup allows you to run react project in both DEV and PROD modes using docker environment.
If you want to use
npminstead, just replace allyarninstances 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 installoryarn./docker-scripts.sh
./docker-scripts.sh prod
Add
-dto run container detached
./docker-scripts.sh prod:build
Add
-dto run container detached
./docker-scripts.sh stop
Read about traefik setup