docker run -it--rm-v$(pwd)/react-frontend/my-react-app:/app -w /app node:16 bash
```
## Step 4) Install and use `create-react-app`
### Step 5) Install and use `create-react-app`
```bash
# install create react app (globally in container)
@@ -75,15 +84,34 @@ Changes not staged for commit:
no changes added to commit (use "git add" and/or "git commit -a")
```
## Step 5) Install web-vitals package
### Step 6) Install web-vitals package
```bash
docker run -it--rm-v$(pwd)/react-frontend/my-react-app:/app -w /app node:16 npm install web-vitals --save
```
## Step 6) Start all services
Continue with "Starting after cloning this repository".
## Starting after cloning this repository
For starting with cloning this repository.
Potential steps in the case of problems:
```bash
docker pull node:16 # pull the node image
docker run -it--rm-v$(pwd)/react-frontend/my-react-app:/app -w /app node:16 bash # run and access node container with map of local my-react-app dir to app dir
```
Inside the node container run,
```bash
npm intall # install all packages in package.json
```
### Step 1) Start all services
Step 6.1) Start all services with rebuilded images
Step 1.1) Start all services with rebuilded images
```bash
docker-compose up --build
@@ -103,7 +131,7 @@ react-frontend_1 |
react-frontend_1 | webpack compiled successfully
```
Step 6.2) Potentially restart tornado-bakend service in a new terminal
Step 1.2) Potentially restart tornado-bakend service in a new terminal