File tree 4 files changed +45
-2
lines changed
4 files changed +45
-2
lines changed Original file line number Diff line number Diff line change
1
+ FROM node:alpine3.10 as builder
2
+
3
+ WORKDIR /var/www/html/react-app
4
+ COPY package.json .
5
+ RUN npm install
6
+ COPY . .
7
+
8
+ RUN npm run build
9
+
10
+ FROM nginx
11
+ COPY --from=builder /var/www/html/react-app/build /usr/share/nginx/html
12
+
Original file line number Diff line number Diff line change
1
+ FROM node:alpine3.10
2
+
3
+ WORKDIR /var/www/html/react-app
4
+
5
+ COPY package.json .
6
+ RUN npm install
7
+ COPY . .
8
+
9
+ CMD [ "npm", "run", "start" ]
Original file line number Diff line number Diff line change
1
+ version : ' 3'
2
+
3
+ services :
4
+ web :
5
+ build :
6
+ context : .
7
+ dockerfile : Dockerfile.dev
8
+ stdin_open : true
9
+ ports :
10
+ - ' 3000:3000'
11
+ volumes :
12
+ - /var/www/html/react-app/node_modules
13
+ - .:/var/www/html/react-app
14
+ tests :
15
+ build :
16
+ context : .
17
+ dockerfile : Dockerfile.dev
18
+ stdin_open : true
19
+ volumes :
20
+ - /var/www/html/react-app/node_modules
21
+ - .:/var/www/html/react-app
22
+ command : ["npm", "run", "test"]
Original file line number Diff line number Diff line change @@ -8,15 +8,15 @@ function App() {
8
8
< header className = "App-header" >
9
9
< img src = { logo } className = "App-logo" alt = "logo" />
10
10
< p >
11
- Edit < code > src/App.js </ code > and save to reload.
11
+ Hello Moto
12
12
</ p >
13
13
< a
14
14
className = "App-link"
15
15
href = "https://reactjs.org"
16
16
target = "_blank"
17
17
rel = "noopener noreferrer"
18
18
>
19
- Learn React
19
+ Learn ReactJS
20
20
</ a >
21
21
</ header >
22
22
</ div >
You can’t perform that action at this time.
0 commit comments