Skip to content

Commit 0615a9e

Browse files
committed
Modify dev docker compose and add one for prod
1 parent 52006e7 commit 0615a9e

File tree

2 files changed

+23
-15
lines changed

2 files changed

+23
-15
lines changed

docker-compose-dev.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
version: '3'
2+
services:
3+
react-app:
4+
build:
5+
context: . # where are all the files located for this project
6+
dockerfile: Dockerfile.dev
7+
ports:
8+
- "3000:3000"
9+
volumes:
10+
- /app/node_modules # do not try to map node_modules directory to anything
11+
- .:/app # map current directory from outside the container to the /app folder inside the container
12+
tests:
13+
build:
14+
context: . # where are all the files located for this project
15+
dockerfile: Dockerfile.dev
16+
volumes:
17+
- /app/node_modules # do not try to map node_modules directory to anything
18+
- .:/app
19+
command: ["npm", "run", "test"]

docker-compose.yml

+4-15
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,8 @@
11
version: '3'
22
services:
3-
react-app:
3+
web:
44
build:
5-
context: . # where are all the files located for this project
6-
dockerfile: Dockerfile.dev
5+
context: .
6+
dockerfile: Dockerfile
77
ports:
8-
- "3000:3000"
9-
volumes:
10-
- /app/node_modules # do not try to map node_modules directory to anything
11-
- .:/app # map current directory from outside the container to the /app folder inside the container
12-
tests:
13-
build:
14-
context: . # where are all the files located for this project
15-
dockerfile: Dockerfile.dev
16-
volumes:
17-
- /app/node_modules # do not try to map node_modules directory to anything
18-
- .:/app
19-
command: ["npm", "run", "test"]
8+
- '80:80'

0 commit comments

Comments
 (0)