Skip to content

Commit 9439346

Browse files
committed
push
1 parent a46df91 commit 9439346

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,20 @@
22

33
Dockerize in production a react application using express as server
44

5-
## Run application
5+
## Run application without docker-compose
66

77
```
88
git clone https://github.com/maxgfr/docker-express-react.git
99
cd docker-express-react
1010
docker build -t docker-express-react .
1111
docker run -it -p 80:80 docker-express-react # Then you can go to this URL : https://localhost/
1212
```
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+
```

docker-compose.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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

0 commit comments

Comments
 (0)