initial boilerplate taken from CRA.
docker-compose up --build
this will blow up the first time as there are no
node_modules
- ssh into the container for node
docker-compose run app /bin/bash
yarn
# exit after yarn installs all the deps and run
# `docker-compose up`
containers (check docker-compose.yml)
- node container serving react
- nginx container proxing requests to node
- app
docker build . -t docker-react
# run it
docker container run -it --rm --name react docker-react:latest
- nginx
cd nginx
docker build . -t docker-nginx
# run it
docker container run --publish 80:80 -it --rm docker-nginx:latest