File tree Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change 2
2
3
3
Dockerize in production a react application using express as server
4
4
5
- ## Run application
5
+ ## Run application without docker-compose
6
6
7
7
```
8
8
git clone https://github.com/maxgfr/docker-express-react.git
9
9
cd docker-express-react
10
10
docker build -t docker-express-react .
11
11
docker run -it -p 80:80 docker-express-react # Then you can go to this URL : https://localhost/
12
12
```
13
+
14
+ ## Running application using docker-compose
15
+
16
+ ```
17
+ git clone https://github.com/maxgfr/docker-express-react.git
18
+ cd docker-express-react
19
+ docker-compose up
20
+ docker-compose down
21
+ ```
Original file line number Diff line number Diff line change
1
+ version : " 3.7"
2
+
3
+ services :
4
+ app :
5
+ container_name : app
6
+ build :
7
+ context : .
8
+ dockerfile : ./Dockerfile
9
+ restart : always
10
+ ports :
11
+ - 80:80
12
+ volumes :
13
+ - ./usr/src/app
14
+ - /usr/src/app/node_modules
You can’t perform that action at this time.
0 commit comments